Opened 5 years ago

Closed 4 years ago

#1912 closed enhancement (fixed)

reduce screen clutter by using 2.5 digit formatting

Reported by: jogger Owned by: zzz
Priority: maintenance Milestone: 0.9.34
Component: apps/console Version: 0.9.28
Keywords: screen clutter formatting Cc:
Parent Tickets: #1913 Sensitive: no


i2p has grown for many years and its abundant reporting features now bring a wealth of lengthy figures that tend to become meaningless. I propose cutting that down everywhere to 2.5 digits like found on many consumer devices with 20 following 19.9. Thats enough for people thinking the step 10 to 11 is too coarse.

Benefits how this is easier on the eyes are easily seen by following examples (no more commas):

before: Peers Active: 2182 / 4309
after: Peers Active: 2.2K / 4.3K

before: 60 sec rate: Average: 1,000,343.875; Highest average: 1,829,479.25; There was 1 event in this period. The period ended 35 sec ago. (Average event count: 1.199; Events in peak period: 1)
after: 60 sec rate: Average: 1M; Highest average: 1.83M; There was 1 event in this period. The period ended 35 sec ago. (Average event count: 1.2k; Events in peak period: 1)

graphs: similar, but can´t show.

applies to snark and all the config pages as well.


Change History (5)

comment:1 Changed 5 years ago by zzz

Component: unspecifiedapps/console
Parent Tickets: 1913
Priority: minormaintenance
Status: newopen

comment:2 Changed 4 years ago by zzz

Milestone: undecided0.9.34
Owner: set to zzz
Status: openaccepted

Peers count: Maybe

Stats page: This page has been moved to the "Advanced" section. It's for diagnostics and it's impossible to "declutter" it, nor do we want to lose the precision, although 3 decimal points may be a little much.

Graphs and Snark: will review/adjust as a part of #1913

comment:3 Changed 4 years ago by jogger

Now that this is accepted, here is the awk code I use in my monitoring scripts:

#! /bin/gawk

# input file format is: Label, dividend, divisor

{ out = $2 / $3

mag = 0
while (out ≥ 1.995) {

out /= 10

if (mag % 3 == 0) {

res = sprintf("%1.2f", out)

sub(/0/, "", res)

} else if (mag % 3 == 1) {

res = sprintf("%2.1f", out * 10)

} else {

res = sprintf("%3.0f", out * 100)

sub(/ /, "", res)

mag -= 2

printf "%s", " " $1 " " res
if (mag == 3)

printf "k"

else if (mag == 6)

printf "M"

else if (mag == 9)

printf "G"


comment:4 Changed 4 years ago by zzz

Preliminary changes in 8cbf0e7bf35bfa697e95c9a205cacc456b37362c 0.9.33-1

comment:5 Changed 4 years ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.