diff options
author | Dave Barach <dave@barachs.net> | 2019-01-24 10:34:24 -0500 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-01-24 16:19:04 +0000 |
commit | ec595ef02639005b34334097af76b41ceef3dca5 (patch) | |
tree | b8b752d9c9371b9ea75a9a28bfa1a3a6e7494b18 /src/vlib/node_cli.c | |
parent | 22f23ae802f6dc654dbef27340c67773eb8be8c3 (diff) |
perfmon plugin: 2-way parallel stat collection
As a FUD reduction measure, this patch implements 2-way parallel
counter collection. Synthetic stat component counter pairs run at the
same time. Running two counters (of any kind) at the same time
naturally reduces the aggregate time required by an approximate
factor-of-2, depending on whether an even or odd number of stats have
been requested.
I don't completely buy the argument that computing synthetic stats
such as instructions-per-clock will be inaccurate if component counter
values are collected sequentially. Given uniform traffic pattern, it
must make no difference.
As the collection interval increases, the difference between serial
and parallel component counter collection will approach zero, see also
the Central Limit theorem.
Change-Id: I36ebdcf125e8882cca8a1929ec58f17fba1ad8f1
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/node_cli.c')
-rw-r--r-- | src/vlib/node_cli.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/src/vlib/node_cli.c b/src/vlib/node_cli.c index 062854af5bc..ad17c1d6f4d 100644 --- a/src/vlib/node_cli.c +++ b/src/vlib/node_cli.c @@ -148,8 +148,6 @@ format_vlib_node_stats (u8 * s, va_list * va) f64 maxc, maxcn; u32 maxn; u32 indent; - u64 pmc_ticks; - f64 pmc_ticks_per_packet; if (!n) { @@ -163,9 +161,6 @@ format_vlib_node_stats (u8 * s, va_list * va) "%=30s%=12s%=16s%=16s%=16s%=16s%=16s", "Name", "State", "Calls", "Vectors", "Suspends", "Clocks", "Vectors/Call"); - if (vm->perf_counter_id) - s = format (s, "%=16s", "Perf Ticks"); - return s; } @@ -182,13 +177,6 @@ format_vlib_node_stats (u8 * s, va_list * va) else maxcn = 0.0; - pmc_ticks = n->stats_total.perf_counter_ticks - - n->stats_last_clear.perf_counter_ticks; - if (p > 0) - pmc_ticks_per_packet = (f64) pmc_ticks / (f64) p; - else - pmc_ticks_per_packet = 0.0; - /* Clocks per packet, per call or per suspend. */ x = 0; if (p > 0) @@ -221,9 +209,6 @@ format_vlib_node_stats (u8 * s, va_list * va) s = format (s, "%-30v%=12U%16Ld%16Ld%16Ld%16.2e%16.2f", ns, format_vlib_node_state, vm, n, c, p, d, x, v); - if (pmc_ticks_per_packet > 0.0) - s = format (s, "%16.2e", pmc_ticks_per_packet); - if (ns != n->name) vec_free (ns); |