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

ConnectionPanel: Added performance colors #258

Merged
merged 8 commits into from Jun 2, 2020
Merged

ConnectionPanel: Added performance colors #258

merged 8 commits into from Jun 2, 2020

Conversation

janbarasek
Copy link
Contributor

  • new feature
  • BC break? no

I would like the processing time to be displayed in color for each query. It is then easy to find slow questions and focus on them.

Some example:

Snímek obrazovky 2020-06-01 v 17 50 19

Thanks!

@dg
Copy link
Member

dg commented Jun 1, 2020

Good idea. I think it can be done in better way like <td style="background:rgb(xxx,xxx,xxx,opacity)", where opacity is calculated directly from time. What do you think?

@lukaspijak
Copy link
Contributor

It would be good to change constants to some percent value from average or someone other statistics function. On local servers or slow shared hostings can be average query time bigger.

@janbarasek
Copy link
Contributor Author

@dg I changed it to rgba() with opacity.

The opacity function is configurable by @lukaspijak suggestion.

What do you think now?

@dg
Copy link
Member

dg commented Jun 1, 2020

It would probably be better configurable if the calculation was log(time) * value and only value was configured. One value instead of X values in $queryPerformanceScale.

@janbarasek
Copy link
Contributor Author

janbarasek commented Jun 1, 2020

Ok, implemented.

The current behavior is like:

Time Opacity
1 0.075
11 0.269
21 0.335
31 0.376
41 0.405
51 0.429
61 0.448
71 0.464
81 0.478
91 0.490
100 0.501
200 0.575
300 0.619
400 0.650
500 0.674
600 0.694
700 0.711
800 0.725
900 0.738
1000 0.750
1100 0.760
1200 0.769
1300 0.778
1400 0.786
1500 0.794

To logarithm must be added + 1, because logarithm is negative for interval (0, 1>.

@dg
Copy link
Member

dg commented Jun 2, 2020

Thanks

@dg dg changed the title Query time performance color debugger ConnectionPanel: Added performance colors Jun 2, 2020
@dg dg merged commit edd8e3d into nette:master Jun 2, 2020
2 checks passed
dg pushed a commit that referenced this pull request Jun 2, 2020
dg pushed a commit that referenced this pull request Jun 9, 2020
dg pushed a commit that referenced this pull request Jul 10, 2020
dg pushed a commit that referenced this pull request Jul 10, 2020
dg pushed a commit that referenced this pull request Aug 2, 2020
dg pushed a commit that referenced this pull request Oct 6, 2020
dg pushed a commit that referenced this pull request Oct 6, 2020
dg pushed a commit that referenced this pull request Oct 15, 2020
dg pushed a commit that referenced this pull request Oct 15, 2020
dg pushed a commit that referenced this pull request Oct 15, 2020
dg pushed a commit that referenced this pull request Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants