-
Notifications
You must be signed in to change notification settings - Fork 299
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
Measure latency of app.breathe() #777
Conversation
This commit adds a histogram facility that can record the distribution of different sampled magnitudes. In particular, it is useful for recording distributions of times. Histograms can be mapped into /var/run/snabb, where they can be analyzed by a separate process. This commit also wires up the app.breathe() loop to record latencies for its breath cycles into a well-known file (/var/run/snabb/PID/engine/latency), and wires up "snabb top" to do some basic statistics on this data.
By analyzing the blame information on this pull request, we identified @eugeneia, @lukego and @javierguerragiraldez to be potential reviewers |
Originally from Igalia#276. |
I'd like to nominate @eugeneia to be the reviewer/upstream on this one, if he's willing. |
if options.measure_latency or options.measure_latency == nil then | ||
local histogram = require('lib.histogram') | ||
local latency = histogram.create('engine/latency', 1e-6, 1e0) | ||
print('hi') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is a debug leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, good catch
Super cool feature, love to see @lukego I think the |
Snabb top has been really useful to us -- for example if we are experiencing packet loss, we need to find where it happens: between which apps, or if not between any apps then on ingress. It helped us have insight on whether to apply backpressure or not (usually we don't, now, following #656). It's good stuff :) I can look at switching to use core.shm.map; good suggestion. I guess by default core.shm.map should clear the file if a previous PID had it open, though. |
Reduced the number of globals
This commit adds a histogram facility that can record the distribution
of different sampled magnitudes. In particular, it is useful for
recording distributions of times. Histograms can be mapped into
/var/run/snabb, where they can be analyzed by a separate process.
This commit also wires up the app.breathe() loop to record latencies for
its breath cycles into a well-known
file (/var/run/snabb/PID/engine/latency), and wires up "snabb top" to do
some basic statistics on this data.