|
From: | Eric Blake |
Subject: | Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/2] block/accounting: introduce latency histogram |
Date: | Thu, 8 Mar 2018 11:31:03 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 03/06/2018 09:32 AM, Stefan Hajnoczi wrote:
On Wed, Feb 07, 2018 at 03:50:36PM +0300, Vladimir Sementsov-Ogievskiy wrote:Introduce latency histogram statics for block devices. For each accounted operation type latency region [0, +inf) is divided into subregions by several points. Then, calculate hits for each subregion. Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden> ---
According to Wikipedia and Mathworld, "intervals" and "bins" are commonly used terms: https://en.wikipedia.org/wiki/Histogram http://mathworld.wolfram.com/Histogram.html I suggest: typedef struct { /* The following histogram is represented like this: * * 5| * * 4| * * 3| * * * 2| * * * * 1| * * * * * +------------------ * 10 50 100 * * BlockLatencyHistogram histogram = { * .nbins = 4, * .intervals = {10, 50, 100}, * .bins = {3, 1, 5, 2}, * };
The name 'intervals' is still slightly ambiguous: does it hold the boundary point (0-10 for 10 slots, 10-50 for 40 slots, 50-100, for 50 slots, then 100-INF) or is it the interval size of each slot (first bin is 10 slots for 0-10, next bin is 50 slots wide so 10-60, next bin is 100 slots wide so 60-160, everything else is 160-INF). But the ascii-art diagram plus the text is sufficient to resolve the intent if you keep that name (I don't have a suggestion for a better name).
-- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |