diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-10-10 10:56:51 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2024-11-05 12:33:05 -0500 |
| commit | 3e3a666331e1e44683b17ab1fd78afc47c5d2677 (patch) | |
| tree | 502cc3516e8cc9ab55b3b58e89d09ae504a49b04 /lib/routemap.h | |
| parent | fe20f83286e103ba12f9cc83c7f30dec47c6d31c (diff) | |
lib: Add ability to track time in individual routemaps
Add the abilty to track how much time is spent in routemaps.
Example of the new output:
eva# show route-map
ZEBRA:
route-map: FOO Invoked: 1000000 (323 milliseconds total) Optimization: enabled Processed Change: false
deny, sequence 10 Invoked 1000000 (320 milliseconds total)
Match clauses:
Set clauses:
Call clause:
Action:
Exit routemap
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/routemap.h')
| -rw-r--r-- | lib/routemap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/routemap.h b/lib/routemap.h index ef9b3cb160..e0f738502b 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -176,6 +176,7 @@ struct route_map_index { /* Keep track how many times we've try to apply */ uint64_t applied; uint64_t applied_clear; + size_t cputime; /* List of match/sets contexts. */ TAILQ_HEAD(, routemap_hook_context) rhclist; @@ -210,6 +211,7 @@ struct route_map { /* How many times have we applied this route-map */ uint64_t applied; uint64_t applied_clear; + size_t cputime; /* Counter to track active usage of this route-map */ uint16_t use_count; |
