[ovs-git] [openvswitch/ovs] aed45b: Add stopwatch timing API

GitHub noreply at github.com
Tue Apr 3 21:12:19 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: aed45befeff278926d968f0676ac54a131e972af
      https://github.com/openvswitch/ovs/commit/aed45befeff278926d968f0676ac54a131e972af
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M lib/automake.mk
    A lib/stopwatch.c
    A lib/stopwatch.h

  Log Message:
  -----------
  Add stopwatch timing API

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 allows for named stopwatches to be created. From there, the
stopwatch can be started and stopped via stopwatch_start() and
stopwatch_stop(). After each run, statistics for the stopwatch will be
calculated.

Statistics for a particular stopwatch can be queried from the command
line by using ovs-appctl -t <target> stopwatch/show <stopwatch name>.

Statistics can be reset from the command line using
ovs-appctl -t <target> stopwatch/reset <stopwatch name>

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 3d0e6f667ccb586ed5dd4e74980671531f9d3c92
      https://github.com/openvswitch/ovs/commit/3d0e6f667ccb586ed5dd4e74980671531f9d3c92
  Author: Mark Michelson <mmichels at redhat.com>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  Measure timing of ovn-controller flow creation.

This modifies ovn-controller to measure the amount of time it takes to
generate flows.

The statistics can be queried using:

ovs-appctl -t ovn-controller stopwatch/show
ovn-controller-flow-generation

The statistics can be reset using:

ovs-appctl -t ovn-controller stopwatch/reset
ovn-controller-flow-generation

Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 89189388d2e1442e9fb49ad0f8f5ea4279508ea8
      https://github.com/openvswitch/ovs/commit/89189388d2e1442e9fb49ad0f8f5ea4279508ea8
  Author: Jakub Sitnicki <jkbs at redhat.com>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M lib/stopwatch.c
    M lib/stopwatch.h

  Log Message:
  -----------
  stopwatch: Add API for retrieving calculated statistics

Will be used for testing the module.

Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 0e124db81f6374ce37b3e73b066d33f534c96327
      https://github.com/openvswitch/ovs/commit/0e124db81f6374ce37b3e73b066d33f534c96327
  Author: Jakub Sitnicki <jkbs at redhat.com>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M lib/stopwatch.c
    M lib/stopwatch.h

  Log Message:
  -----------
  stopwatch: Add API for waiting until samples have been processed

Will be used for testing the module.

Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


  Commit: 44c8281473e762c8c52d4611fa331e9566485560
      https://github.com/openvswitch/ovs/commit/44c8281473e762c8c52d4611fa331e9566485560
  Author: Jakub Sitnicki <jkbs at redhat.com>
  Date:   2018-04-03 (Tue, 03 Apr 2018)

  Changed paths:
    M lib/stopwatch.c
    M tests/automake.mk
    M tests/library.at
    A tests/test-stopwatch.c

  Log Message:
  -----------
  tests: Add tests for stopwatch module

Check if stopwatch module is calculating statistics as expected.

Signed-off-by: Jakub Sitnicki <jkbs at redhat.com>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/59ab42d47fbd...44c8281473e7


More information about the git mailing list