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

Group values for every 0.05 second interval between 0 and 5 seconds #9

Open
bobbingwide opened this issue Jan 27, 2021 · 3 comments
Open
Assignees

Comments

@bobbingwide
Copy link
Owner

For slog-bloat I need the figures for each file being compared and need to know how many requests were dealt with in each interval of 1/20th of a second ( 0.05 secs ).
Otherwise the chart goes well wrong.
It's quite pretty... but useless.

  1. Sort sequence on the x-axis is wrong
  2. Labels are wrong
  3. Values shouldn't drop to 0 for accumulated percentages!

image

These changes also apply to the Elapsed chart displayed in slog.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 28, 2021

I achieved the desired results with a few changes.

image

  1. Sort sequence correct
  2. Labels are correct - reflecting the file name
  3. Values are determined for each interval

Prior to running the grouping I initialised the groups to the required time intervals with an init_groups method.
This is called for the Elapsed report.

function run_elapsed_report() {
	 	$this->grouper->reset();
		 $this->grouper->time_field('final');
		 $this->grouper->init_groups( array( $this, "twentiethsecond" ), 0, 0.05, 6.0 );
		 $this->grouper->groupby( "final", array( $this, "twentiethsecond" ) );
		 $this->grouper->ksort();
		 $this->grouper->having( array( $this, "having_filter_value_ge" ) );
		 //	 $grouper->report_percentages();
		 $content = $this->fetch_content();
		 return $content;
	 }

reset() is no longer called by groupby(). I need to check if any other code has to be changed. eg in wp-top12.

New requirements

Where the orginal server responses are bad the chart is OK.
See the lines for filtered.csv and ebpsuk0127.csv.
But when things are much quicker the values are a bit squashed.
We need more granularity; count requests in smaller intervals.

  • The ability to specify the interval length and initialisation of the groups based on that value.
  • The ability to set the maximum value for grouping. Note: Anything else gets bundled into this last group.

@bobbingwide
Copy link
Owner Author

The logic changes already implemented for slog-bloat also need implementing for slog's charts.
Could/should this be an option?

@bobbingwide
Copy link
Owner Author

reset() is no longer called by groupby(). I need to check if any other code has to be changed. eg in wp-top12.

Yes it did need changing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant