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

Print cost metrics in units #68

Merged
merged 1 commit into from May 8, 2019

Conversation

2 participants
@kokosing
Copy link
Member

commented Jan 25, 2019

Print cost metrics in units

@cla-bot cla-bot bot added the cla-signed label Jan 25, 2019

@kokosing

This comment has been minimized.

Copy link
Member Author

commented Jan 25, 2019

@kokosing

This comment has been minimized.

Copy link
Member Author

commented Jan 25, 2019

Blocked on airlift/units#8

@kokosing kokosing force-pushed the kokosing:origin/master/063_cost_in_unit branch from b8ee32d to a69f09a Jan 30, 2019

@martint martint self-assigned this Apr 22, 2019

@martint
Copy link
Member

left a comment

One minor comment, but otherwise looks good

private static String formatDoubleAsDataSize(double value)
{
if (!isFinite(value)) {
return Double.toString(value);

This comment has been minimized.

Copy link
@martint

martint Apr 29, 2019

Member

We could use +/- \u221E (∞) here instead of rendering as "Infinity".

@@ -477,6 +479,23 @@ private void printWindowOperatorStats(int indent, WindowOperatorStats stats)
output.append('\n');
}

private static String formatDoubleAsCpuCost(double value)
{
return formatDoubleAsDataSize(value).replaceAll("B$", "");

This comment has been minimized.

Copy link
@martint

martint Apr 29, 2019

Member

This is not ideal as it uses "data size", which is completely unrelated. Although that class/format doesn't change much, it makes this code brittle. But it will do for now. We can later have a dedicated formatter for cost units.

@martint martint assigned kokosing and unassigned martint Apr 29, 2019

@kokosing kokosing force-pushed the kokosing:origin/master/063_cost_in_unit branch from a69f09a to aab4bea May 6, 2019

@kokosing kokosing force-pushed the kokosing:origin/master/063_cost_in_unit branch from aab4bea to 8b5d658 May 8, 2019

@kokosing kokosing merged commit 3a333a3 into prestosql:master May 8, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
verification/cla-signed
Details

@kokosing kokosing deleted the kokosing:origin/master/063_cost_in_unit branch May 8, 2019

@kokosing kokosing added this to the 311 milestone May 8, 2019

@kokosing kokosing referenced this pull request May 8, 2019

Closed

Release notes for 311 #716

5 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.