diff mbox series

[PULL,1/5] qapi/block-core: Tidy up BlockLatencyHistogramInfo documentation

Message ID 20230726112855.155795-2-armbru@redhat.com
State New
Headers show
Series [PULL,1/5] qapi/block-core: Tidy up BlockLatencyHistogramInfo documentation | expand

Commit Message

Markus Armbruster July 26, 2023, 11:28 a.m. UTC
Documentation for member @bin comes out like

    list of io request counts corresponding to histogram intervals.
    len("bins") = len("boundaries") + 1 For the example above, "bins"
    may be something like [3, 1, 5, 2], and corresponding histogram
    looks like:

Note how the equation and the sentence following it run together.
Replace the equation:

    list of io request counts corresponding to histogram intervals,
    same number of elements as "boundaries".  For the example above,
    "bins" may be something like [3, 1, 5, 2], and corresponding
    histogram looks like:

Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20230720071610.1096458-2-armbru@redhat.com>
---
 qapi/block-core.json | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Vladimir Sementsov-Ogievskiy July 26, 2023, 11:33 a.m. UTC | #1
On 26.07.23 14:28, Markus Armbruster wrote:
> Documentation for member @bin comes out like
> 
>      list of io request counts corresponding to histogram intervals.
>      len("bins") = len("boundaries") + 1 For the example above, "bins"
>      may be something like [3, 1, 5, 2], and corresponding histogram
>      looks like:
> 
> Note how the equation and the sentence following it run together.
> Replace the equation:
> 
>      list of io request counts corresponding to histogram intervals,
>      same number of elements as "boundaries".  For the example above,

not same, but one more. N points break the line into N+1 intervals

>      "bins" may be something like [3, 1, 5, 2], and corresponding
>      histogram looks like:
> 
> Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> Message-ID: <20230720071610.1096458-2-armbru@redhat.com>
> ---
>   qapi/block-core.json | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 5dd5f7e4b0..6ca448b6e6 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -652,10 +652,9 @@
>   #     10), [10, 50), [50, 100), [100, +inf).
>   #
>   # @bins: list of io request counts corresponding to histogram
> -#     intervals.
> -#     len(@bins) = len(@boundaries) + 1
> -#     For the example above, @bins may be something like [3, 1, 5, 2],
> -#     and corresponding histogram looks like:
> +#     intervals, same number of elements as @boundaries.  For the
> +#     example above, @bins may be something like [3, 1, 5, 2], and
> +#     corresponding histogram looks like:
>   #
>   # ::
>   #
Markus Armbruster July 26, 2023, 12:01 p.m. UTC | #2
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:

> On 26.07.23 14:28, Markus Armbruster wrote:
>> Documentation for member @bin comes out like
>>      list of io request counts corresponding to histogram intervals.
>>      len("bins") = len("boundaries") + 1 For the example above, "bins"
>>      may be something like [3, 1, 5, 2], and corresponding histogram
>>      looks like:
>>
>> Note how the equation and the sentence following it run together.
>> Replace the equation:
>>
>>      list of io request counts corresponding to histogram intervals,
>>      same number of elements as "boundaries".  For the example above,
>
> not same, but one more. N points break the line into N+1 intervals

Thanks for catching this.

What about "one more element than @boundaries has"?

>>      "bins" may be something like [3, 1, 5, 2], and corresponding
>>      histogram looks like:
>> Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> Message-ID: <20230720071610.1096458-2-armbru@redhat.com>
Vladimir Sementsov-Ogievskiy July 26, 2023, 12:47 p.m. UTC | #3
On 26.07.23 15:01, Markus Armbruster wrote:
> Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> writes:
> 
>> On 26.07.23 14:28, Markus Armbruster wrote:
>>> Documentation for member @bin comes out like
>>>       list of io request counts corresponding to histogram intervals.
>>>       len("bins") = len("boundaries") + 1 For the example above, "bins"
>>>       may be something like [3, 1, 5, 2], and corresponding histogram
>>>       looks like:
>>>
>>> Note how the equation and the sentence following it run together.
>>> Replace the equation:
>>>
>>>       list of io request counts corresponding to histogram intervals,
>>>       same number of elements as "boundaries".  For the example above,
>>
>> not same, but one more. N points break the line into N+1 intervals
> 
> Thanks for catching this.
> 
> What about "one more element than @boundaries has"?

Sounds good!

> 
>>>       "bins" may be something like [3, 1, 5, 2], and corresponding
>>>       histogram looks like:
>>> Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>> Message-ID: <20230720071610.1096458-2-armbru@redhat.com>
>
diff mbox series

Patch

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5dd5f7e4b0..6ca448b6e6 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -652,10 +652,9 @@ 
 #     10), [10, 50), [50, 100), [100, +inf).
 #
 # @bins: list of io request counts corresponding to histogram
-#     intervals.
-#     len(@bins) = len(@boundaries) + 1
-#     For the example above, @bins may be something like [3, 1, 5, 2],
-#     and corresponding histogram looks like:
+#     intervals, same number of elements as @boundaries.  For the
+#     example above, @bins may be something like [3, 1, 5, 2], and
+#     corresponding histogram looks like:
 #
 # ::
 #