diff options
author | Vladislav Grishenko <themiron@yandex-team.ru> | 2021-07-14 18:16:02 +0500 |
---|---|---|
committer | Damjan Marion <dmarion@0xa5.net> | 2024-03-05 18:49:49 +0000 |
commit | 3026ffa091ff1fd6a61ac6e2796982796e47f8e8 (patch) | |
tree | 3fd5e48b69c5f1da400777a345f8b42b77b3034a /src/vlib/main.c | |
parent | fb9d1ac843884aca79873577b53f6254e7933478 (diff) |
vlib: fix initial stats time for the process nodes
Uninitialized stats time for new dynamic processes (like unix
cli) leads to invalid and too high clocks diff, breaking the
stats collecting.
$ sudo vppctl sh runtime | grep unix
unix-cli-new-session any wait 0 0 30 2.72e3 0.00
unix-cli-process-0 active 14 0 27 3.73e15 0.00
unix-epoll-input polling 6464 0 0 3.56e6 0.00
unix-epoll-input polling 68360 0 0 1.31e3 0.00
Type: fix
Signed-off-by: Vladislav Grishenko <themiron@yandex-team.ru>
Change-Id: Ic70678b67a3fb3f78ed4a1a03077ae243ed5d7cd
Diffstat (limited to 'src/vlib/main.c')
-rw-r--r-- | src/vlib/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 6d91db7a5b3..5f070f6b218 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1354,7 +1354,8 @@ vlib_start_process (vlib_main_t * vm, uword process_index) { vlib_node_main_t *nm = &vm->node_main; vlib_process_t *p = vec_elt (nm->processes, process_index); - dispatch_process (vm, p, /* frame */ 0, /* cpu_time_now */ 0); + u64 cpu_time_now = clib_cpu_time_now (); + dispatch_process (vm, p, /* frame */ 0, cpu_time_now); } static u64 |