Project

General

Profile

Actions

Bug #41754

open

Use dump_stream() instead of dump_float() for floats where max precision isn't helpful

Added by David Zafman over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
David Zafman
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Some examples from osd dump are below. The full_ratio is .95, backfill_ratio .90 and nearfull_ratio .85.

"full_ratio": 0.949999988079071,
"backfillfull_ratio": 0.8999999761581421,
"nearfull_ratio": 0.8500000238418579,

Some fields from osd dump I'm not sure about.

"weight": 0.904632568359375,
"primary_affinity": 0.451995849609375,

Another example of useless precision:

$ ceph daemon osd.0 compact
{
"elapsed_time": 0.087996230999999994
}


Related issues 1 (0 open1 closed)

Related to RADOS - Bug #41156: dump_float() poor outputRejectedDavid Zafman08/07/2019

Actions
Actions #1

Updated by Марк Коренберг over 4 years ago

Regarding elapsed time it might be important (for `compact` is not, but for benchmarking is). Another importatnat thing -- Prometheus plugin. It gathers info from such API. and it requires full precision.

As a compromise, it might be possible to add special global parameter (i.e. precision), that can be used in dump_float.

Possibly, we might restrict precision in json-pretty, but leave full precision in json. This is nice idea, but it is quite unexpected for admins/developers.

Actions #2

Updated by David Zafman over 4 years ago

I was suspicious that the trailing 0999999994 in the elapsed time is noise. Could this be caused by a float being cast to double?

Actions #3

Updated by David Zafman over 4 years ago

  • Related to Bug #41156: dump_float() poor output added
Actions #4

Updated by David Zafman over 4 years ago

From json.org:

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.

The whole reason I'm fixing this bug instead of https://tracker.ceph.com/issues/41156 is because of the claim that JSON output is only for machines to parse.

Actions

Also available in: Atom PDF