Skip to content
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

opt: display float costs and stats more accurately #26873

Merged
merged 2 commits into from
Jun 21, 2018

Conversation

RaduBerinde
Copy link
Member

The costs and stats are not very useful when the values are small
(which tends to happen when there are multi-column constraints).

Switching the display of floats to use %.9g. This show us a bunch of
significant digits regardless of the scale while still displaying
integers without a decimal point:

           Value | %.9g
               0 | 0
 0.0000000001234 | 1.234e-10
        0.001234 | 0.001234
             0.1 | 0.1
               1 | 1
          1.0001 | 1.0001
       1234.5678 | 1234.5678
        12345678 | 12345678
       200000000 | 200000000

Release note: None

@RaduBerinde RaduBerinde requested a review from a team as a code owner June 20, 2018 21:46
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft
Copy link
Collaborator

rytaft commented Jun 20, 2018

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)


Comments from Reviewable

The costs and stats are not very useful when the values are small
(which tends to happen when there are multi-column constraints).

Switching the display of floats to use `%.9g`. This show us a bunch of
significant digits regardless of the scale while still displaying
integers without a decimal point:
```
           Value | %.9g
               0 | 0
 0.0000000001234 | 1.234e-10
        0.001234 | 0.001234
             0.1 | 0.1
               1 | 1
          1.0001 | 1.0001
       1234.5678 | 1234.5678
        12345678 | 12345678
       200000000 | 200000000
```

Release note: None
Release note: None
@RaduBerinde
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Jun 21, 2018

Canceled (will resume)

craig bot pushed a commit that referenced this pull request Jun 21, 2018
26873: opt: display float costs and stats more accurately r=RaduBerinde a=RaduBerinde

The costs and stats are not very useful when the values are small
(which tends to happen when there are multi-column constraints).

Switching the display of floats to use `%.9g`. This show us a bunch of
significant digits regardless of the scale while still displaying
integers without a decimal point:
```
           Value | %.9g
               0 | 0
 0.0000000001234 | 1.234e-10
        0.001234 | 0.001234
             0.1 | 0.1
               1 | 1
          1.0001 | 1.0001
       1234.5678 | 1234.5678
        12345678 | 12345678
       200000000 | 200000000
```

Release note: None


Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Jun 21, 2018

Build succeeded

@craig craig bot merged commit 00d38d4 into cockroachdb:master Jun 21, 2018
@RaduBerinde RaduBerinde deleted the display-floats branch June 21, 2018 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants