Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve transaction counter graph resolution and scale #487

Closed
sm-shaw opened this issue Jan 4, 2023 · 2 comments · Fixed by #494
Closed

Improve transaction counter graph resolution and scale #487

sm-shaw opened this issue Jan 4, 2023 · 2 comments · Fixed by #494
Assignees
Labels
enhancement New feature or request gui

Comments

@sm-shaw
Copy link
Contributor

sm-shaw commented Jan 4, 2023

The original transaction counter graph was something quick with no further dependencies, however expanding the window the graph size is fixed and doesn't scale as it could for example:

scaledemo

The graph should be updated to adapt when the window is expanded.

It will be possible to use the tkpath canvas already added here to give more advanced capabilities #478

@sm-shaw sm-shaw added enhancement New feature or request gui labels Jan 4, 2023
@sm-shaw sm-shaw self-assigned this Jan 4, 2023
@sm-shaw
Copy link
Contributor Author

sm-shaw commented Jan 24, 2023

Transaction counter has been updated to implement a more standardised graph using tkpath features with examples from SQL Server on Windows using GDI.

tccounter

The graph will redraw/resize as the window/canvas is resized:

tccountlge

and adjust both height and width independently:

tccountmed

The updated transaction counter will show 20 data points and move from right to left over time, with non-filled data points showing as 0 instead of building up the graph filling the entire chart with a smaller number of datapoints. The window can also continue to be dragged out to a standalone window.

tcontdrag

The default graph will be a polyline with a vertical colour gradient to white, however the previous ribbon effect will be possible as a non-default config option in the .xml config files only. The image shows an example of antialiasing from tkpath.

ribbon

This is in contrast to the current graph at v4.6 that does not use antialising.

orig

minor gradient effects have also been added to the CPU metrics

cpu

Further testing and updates on Linux using Cairo Graphics prior to PR to fix the issue of the transaction counter graph not resizing when the window is resized.

@sm-shaw
Copy link
Contributor Author

sm-shaw commented Jan 24, 2023

Linux example with MariaDB

mdbtc

Trace shows use of cairo

%!CairoScript - wish8.6
dict
  /type /xlib set
  /drawable 16!3800d28 set
  /content //COLOR set
  /width 691 set
  /height 245 set
  surface dup /s0 exch def
context % c0
1 0 0 1 30 30 matrix transform
n 67.5 0.5 575 193 rectangle
0.784314 0.784314 0.784314 1 set-source-rgba
1 set-line-width
//LINE_CAP_BUTT set-line-cap
//LINE_JOIN_ROUND set-line-join
4 set-miter-limit
stroke
pop % c0 destroyed
/s0 undef
dict
  /type /xlib set
  /drawable 16!3800d80 set
  /content //COLOR set
  /width 665 set
  /height 245 set
  surface dup /s0 exch def
context % c0
1 0 0 1 4 30 matrix transform
n 67.5 193.5 m 67.5 0.5 l 0.784314 0.784314 0.784314 1 set-source-rgba
1 set-line-width
//LINE_CAP_BUTT set-line-cap
//LINE_JOIN_ROUND set-line-join
4 set-miter-limit
[3 3 3 3] 0 set-dash
stroke
pop % c0 destroyed
/s0 undef
dict
  /type /xlib set
  /drawable 16!3800d80 set
  /content //COLOR set
  /width 665 set
  /height 245 set
  surface dup /s0 exch def
context % c0
1 0 0 1 4 30 matrix transform
n 97.5 193.5 m 97.5 0.5 l 0.784314 0.784314 0.784314 1 set-source-rgba
1 set-line-width
//LINE_CAP_BUTT set-line-cap
//LINE_JOIN_ROUND set-line-join
4 set-miter-limit
[3 3 3 3] 0 set-dash
stroke
...

Some minor further sizing adjustments are needed and further testing on Linux distros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant