Project

General

Profile

Feature #713

Throughput display should be harmonized with lttng usage

Added by Daniel U. Thibault almost 6 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
Start date:
01/13/2014
Due date:
% Done:

0%

Estimated time:

Description

The lttngtop starting window's statistics include a throughput display (generated in src/cursesdisplay.c), which is typically something like:

FDs         2011    (+12,-13)         9KB/sec

It uses K, M and G to mean 1000, 10E6 and 10E9 respectively. Meanwhile, lttng uses the same letters in the enable-channel and snapshot commands (with the subbuf-size/tracefile-size and max-size options, respectively) to mean 1024, 1024^2 and 1024^3. The change of scale makes sense since the natural scale for throughput is metric while that for memory size is binary. The lttng command should ideally use the proper binary symbols (Ki, Mi, Gi), but that would make parsing the command option's value more difficult, so the exception is acceptable as long as the usage is properly documented.

My suggestion boils down to just two small corrections:

  • The correct metric symbol 'k' should be used instead of 'K' (which can only mean kelvin or kibi).
  • A space should appear between the throughput value and its units.

Also available in: Atom PDF