From 4c31f4ecb8c10620376af39e1d648b92895e8c96 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sun, 18 Jan 2026 11:20:58 +0300 Subject: [PATCH] [Minor] WebUI: Add frequency stddev column and units to symbols table - Add frequency standard deviation column with the same exponential scaling as frequency for consistent notation. Hidden on smaller screens (lg breakpoint) - Display units (hits/s for frequencies, s for time) in table headers - Remove "s" suffix from time cells (unit now in header) --- interface/js/app/symbols.js | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index e7b85cdb04..d318b7016c 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -41,6 +41,7 @@ define(["jquery", "app/common", "footable"], const items = []; const lookup = {}; const freqs = []; + const stddevs = []; const distinct_groups = []; data.forEach((group) => { @@ -63,13 +64,13 @@ define(["jquery", "app/common", "footable"], if (!item.time) { item.time = 0; } - item.time = Number(item.time).toFixed(2) + "s"; - if (!item.frequency) { - item.frequency = 0; - } + item.time = Number(item.time).toFixed(2); + + // Normalize frequency values for scaling + ["frequency", "frequency_stddev"].forEach((p) => (item[p] = Number(item[p] || 0))); + freqs.push(item.frequency); - // Don't round yet, keep precision for scaling - item.frequency = Number(item.frequency); + stddevs.push(item.frequency_stddev); if (!(item.group in lookup)) { lookup[item.group] = 1; distinct_groups.push(item.group); @@ -92,12 +93,16 @@ define(["jquery", "app/common", "footable"], exp++; } } - $.each(items, (i, item) => { - const numericFreq = Number(item.frequency); - item.frequency = { - value: (numericFreq * mult).toFixed(2) + ((exp > 0) ? "e-" + exp : ""), - options: {sortValue: numericFreq} + + function formatFrequency(value) { + return { + value: (value * mult).toFixed(2) + ((exp > 0) ? "e-" + exp : ""), + options: {sortValue: value} }; + } + $.each(items, (i, item) => { + item.frequency = formatFrequency(item.frequency); + item.frequency_stddev = formatFrequency(item.frequency_stddev); }); return [items, distinct_groups]; } @@ -175,11 +180,15 @@ define(["jquery", "app/common", "footable"], {name: "description", title: "Description", breakpoints: "md"}, {name: "weight", title: "Score"}, {name: "frequency", - title: "Frequency", + title: "Frequency, hits/s", breakpoints: "md", sortValue: (val) => val.options.sortValue}, + {name: "frequency_stddev", + title: "Stddev, hits/s", + breakpoints: "lg", + sortValue: (val) => val.options.sortValue}, {name: "time", - title: "Avg. time", + title: "Avg. time, s", breakpoints: "md", sortValue: (val) => parseFloat(val)}, ], -- 2.47.3