New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable printing out readable size and time values #3432

Closed
javanna opened this Issue Aug 2, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@javanna
Member

javanna commented Aug 2, 2013

When we generate responses, mainly in cluster monitoring apis, we currently print time and size values twice, in two formats: the raw number and the readable format. Although the readable version is easy to read for human beings, it generates a lot of garbage in memory, which is something that we want to disable if not needed.

Let's then add support for a new "readable_format" parameter that allows to control whether we want to print out the readable version or not.

The plan is to keep it backward compatible on 0.90 (the default value will be true , meaning that readable values will be printed out by default). As of 1.0 we'll change the default to false, therefore in order to have readable values printed out you'll need to explicitly ask for them.

@s1monw

This comment has been minimized.

Show comment
Hide comment
@s1monw

s1monw Aug 2, 2013

Contributor

@javanna did you close this by accident?

Contributor

s1monw commented Aug 2, 2013

@javanna did you close this by accident?

@javanna

This comment has been minimized.

Show comment
Hide comment
@javanna

javanna Aug 3, 2013

Member

@s1monw weird, not sure what happened, but yeah it shouldn't be closed ;)

Member

javanna commented Aug 3, 2013

@s1monw weird, not sure what happened, but yeah it shouldn't be closed ;)

@javanna javanna reopened this Aug 3, 2013

@javanna javanna closed this in a307154 Aug 6, 2013

javanna added a commit that referenced this issue Aug 20, 2013

Added support for readable_format parameter when printing out time an…
…d size values (#3432), kept backwards compatibility in 0.90 (default true)

The following are the API affected by this change and support now the readable_format flag (default true when not specified):
- indices segments
- indices stats
- indices status
- cluster nodes stats
- cluster nodes info
@mattweber

This comment has been minimized.

Show comment
Hide comment
@mattweber

mattweber Aug 26, 2013

Contributor

Hey @javanna I think some of the stats might mixed around. For example the jvm heap stats, the "heap_used" is listed in bytes and "heap_used_in_bytes" is human readable.

Contributor

mattweber commented Aug 26, 2013

Hey @javanna I think some of the stats might mixed around. For example the jvm heap stats, the "heap_used" is listed in bytes and "heap_used_in_bytes" is human readable.

@rdeaton

This comment has been minimized.

Show comment
Hide comment
@rdeaton

rdeaton Aug 26, 2013

To follow up the above, here's some samples

0.90.3

     "mem" : {
      "heap_used" : "944.3mb",
      "heap_used_in_bytes" : 990229488,
      "heap_committed" : "3.8gb",
      "heap_committed_in_bytes" : 4151836672,

master with human=true

    "mem" : {
      "heap_used_in_bytes" : "442.1mb",
      "heap_used" : 463651520,
      "heap_committed_in_bytes" : "7.8gb",
      "heap_committed" : 8432910336,

master with human=false

    "mem" : {
      "heap_used" : 1313525704,
      "heap_committed" : 8432910336,
      "non_heap_used" : 43150512,
      "non_heap_committed" : 66523136,

rdeaton commented Aug 26, 2013

To follow up the above, here's some samples

0.90.3

     "mem" : {
      "heap_used" : "944.3mb",
      "heap_used_in_bytes" : 990229488,
      "heap_committed" : "3.8gb",
      "heap_committed_in_bytes" : 4151836672,

master with human=true

    "mem" : {
      "heap_used_in_bytes" : "442.1mb",
      "heap_used" : 463651520,
      "heap_committed_in_bytes" : "7.8gb",
      "heap_committed" : 8432910336,

master with human=false

    "mem" : {
      "heap_used" : 1313525704,
      "heap_committed" : 8432910336,
      "non_heap_used" : 43150512,
      "non_heap_committed" : 66523136,
@javanna

This comment has been minimized.

Show comment
Hide comment
@javanna

javanna Aug 27, 2013

Member

Thanks guys for pointing that out, looking into it ;)

Member

javanna commented Aug 27, 2013

Thanks guys for pointing that out, looking into it ;)

javanna added a commit that referenced this issue Aug 27, 2013

Fixed order of parameters when calling byteSizeField and timeValueFie…
…ld methods (introduced with #3432 - support for human readable flag)

javanna added a commit that referenced this issue Aug 27, 2013

Fixed order of parameters when calling byteSizeField and timeValueFie…
…ld methods (introduced with #3432 - support for human readable flag)
@javanna

This comment has been minimized.

Show comment
Hide comment
@javanna

javanna Aug 27, 2013

Member

@mattweber @rdeaton thanks a lot!
It was a horrible mistake, but luckily it's fixed now :)

Member

javanna commented Aug 27, 2013

@mattweber @rdeaton thanks a lot!
It was a horrible mistake, but luckily it's fixed now :)

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Added support for readable_format parameter when printing out time an…
…d size values (#3432), kept backwards compatibility in 0.90 (default true)

The following are the API affected by this change and support now the readable_format flag (default true when not specified):
- indices segments
- indices stats
- indices status
- cluster nodes stats
- cluster nodes info

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Fixed order of parameters when calling byteSizeField and timeValueFie…
…ld methods (introduced with #3432 - support for human readable flag)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment