On Tue, Aug 27, 2013 at 09:25:10PM -0700, Alex Wang wrote: > This commit changes the "ovs-appctl coverage/show" command to show the > per-second, per-minute and per-hour rates of function invocation. More > importantly, this makes using coverage counter an easy way to monitor > the execution of specific functions. > > Signed-off-by: Alex Wang <al...@nicira.com>
Thanks, Alex. After this patch, coverage_read() seems halfway between two designs. My goal was to avoid holding coverage_mutex while constructing the log message, to keep the hold time low, by copying out the totals and then building the message with the copies. Your version retains the copy-out for totals but extends the mutex hold time across the log messages anyway since it needs access to new data. I'd suggest doing the summations holding the lock but then dropping it before constructing the log mesage. I think that the units might be a little confusing. All of the units are really per second, right? It's just that they are per second over the last second, per second averaged over the last hour, per second averaged over the last day. (Right?) We might want to clarify that. I am not sure how to make it really clear in the coverage/show output, but writing the results in some way other than "/min", "/hr" might help, since people naturally read that as per-minute or per-hour. The comma is out of place here: + static unsigned int min_idx ,hr_idx; _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev