summaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon/perfmon.c
diff options
context:
space:
mode:
authorRay Kinsella <mdr@ashroe.eu>2021-01-21 18:18:45 +0000
committerDamjan Marion <dmarion@me.com>2021-03-16 21:36:47 +0000
commit5e798bce421aaae093ef795c0812420c83cddda6 (patch)
treee2895b34bee308a866e69297eccaa67d113d5760 /src/plugins/perfmon/perfmon.c
parent718359881ddae4569de0d029faa60fea05920922 (diff)
perfmon: add support for raw and timestamps
Add perfmon plugin support to output raw counter and timestamps, both are useful for debug. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ia5a73d1f05e3464c18991c2346f0ed8b7ef63099
Diffstat (limited to 'src/plugins/perfmon/perfmon.c')
-rw-r--r--src/plugins/perfmon/perfmon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/perfmon/perfmon.c b/src/plugins/perfmon/perfmon.c
index 07a4ae61859..7a69d454fd0 100644
--- a/src/plugins/perfmon/perfmon.c
+++ b/src/plugins/perfmon/perfmon.c
@@ -238,6 +238,7 @@ perfmon_start (vlib_main_t *vm)
vlib_node_set_dispatch_wrapper (vlib_mains[i],
perfmon_dispatch_wrapper);
}
+ pm->sample_time = vlib_time_now (vm);
pm->is_running = 1;
return 0;
}
@@ -268,6 +269,7 @@ perfmon_stop (vlib_main_t *vm)
}
pm->is_running = 0;
+ pm->sample_time = vlib_time_now (vm) - pm->sample_time;
return 0;
}