stats: swap used and total stats 45/36245/2
authorLeland Krych <leland.krych@gmail.com>
Thu, 26 May 2022 15:37:54 +0000 (08:37 -0700)
committerBeno�t Ganne <bganne@cisco.com>
Wed, 1 Jun 2022 14:40:03 +0000 (14:40 +0000)
Type: fix

reported stats seem to have mixed up used and total counters

Signed-off-by: Leland Krych <leland.krych@gmail.com>
Change-Id: I221c7b114c0da2ed53171d7f047a4bda07ee6cb2

src/vlib/stats/provider_mem.c

index 1f6d646..f3a3f5d 100644 (file)
@@ -58,8 +58,8 @@ vlib_stats_register_mem_heap (clib_mem_heap_t *heap)
   vlib_stats_validate (idx, 0, STAT_MEM_RELEASABLE);
 
   /* Create symlink */
-  vlib_stats_add_symlink (idx, STAT_MEM_TOTAL, "/mem/%s/used", heap->name);
-  vlib_stats_add_symlink (idx, STAT_MEM_USED, "/mem/%s/total", heap->name);
+  vlib_stats_add_symlink (idx, STAT_MEM_USED, "/mem/%s/used", heap->name);
+  vlib_stats_add_symlink (idx, STAT_MEM_TOTAL, "/mem/%s/total", heap->name);
   vlib_stats_add_symlink (idx, STAT_MEM_FREE, "/mem/%s/free", heap->name);
 
   r.private_data = vec_len (memory_heaps_vec) - 1;