On Tue, Feb 20, 2018 at 04:13:31PM -0600, Mark Michelson wrote: > This is similar to the existing coverage and perf-counter APIs in OVS. > However, rather than keeping counters, this is aimed at timing how long > operations take to perform. "Operations" in this case can be anything > from a loop iteration, to a function, to something more complex. > > The library will keep track of how long it takes to perform the > particular operations and will maintain statistics of those running > times. > > Statistics for a particular operation can be queried from the command > line by using ovs-appctl -t <target> performance/show <operation name>. > > The API is designed to be pretty small. The expected steps are as > follows: > > 1) Create a performance measurement, providing a unique name, using > performance_create() > 2) Add calls to start_sample() and end_sample() to mark the start and > stop of the operation you wish to measure. > > Two CLI commands have been added: > * Display statistics for a particular measurement. > * Reset a particular measurement. > > Signed-off-by: Mark Michelson <mmich...@redhat.com>
"sparse" pointed out that unit_name[] should be static: ../lib/performance.c:85:12: error: symbol 'unit_name' was not declared. Should it be static? _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev