From 3fe8ddaf328a769b149eb29cde94f68202798307 Mon Sep 17 00:00:00 2001 From: Sivaprasad Tummala Date: Wed, 11 Jun 2025 10:21:43 +0000 Subject: [PATCH] vlib: increase CPU base frequency precision MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Updated the 'show cpu' CLI command to print the base frequency with 4 decimal places instead of 2 (e.g., 2.69 GHz → 2.6945 GHz) for improved accuracy when inspecting CPU timing characteristics Type: improvement Change-Id: I8f3384204ddcb8033aae9a1e1f6d06bed46478ab Signed-off-by: Sivaprasad Tummala --- src/vlib/cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vlib/cli.c b/src/vlib/cli.c index 38a8c2aa19c..f66d57ae497 100644 --- a/src/vlib/cli.c +++ b/src/vlib/cli.c @@ -980,8 +980,8 @@ show_cpu (vlib_main_t * vm, unformat_input_t * input, _("Model name", "%U", format_cpu_model_name); _("Microarch model (family)", "%U", format_cpu_uarch); _("Flags", "%U", format_cpu_flags); - _("Base frequency", "%.2f GHz", - ((f64) vm->clib_time.clocks_per_second) * 1e-9); + _ ("Base frequency", "%.4f GHz", + ((f64) vm->clib_time.clocks_per_second) * 1e-9); #undef _ return 0; } -- 2.16.6