Skip to content

Add --factor option to scale the presented values. #18

Merged
merged 2 commits into from Apr 3, 2013

2 participants

@timbunce

The flamegraph processing requires the addition of many values.
Using floating-point values causes cumulative errors. These are
most noticable when --total is used because otherwise the graph
self-scales to the width.

This patch adds a --factor option that scales the presented values.
So instead of providing floating point values in the data, the data can
be provided as integers and the result scaled to suit using --factor.

p.s The problem with floats in severe enough that I'd recommend removing
support for them. Just change the regex back to \d+.

timbunce added some commits Mar 30, 2013
@timbunce timbunce Add --factor option to scale the presented values.
The flamegraph processing requires the addition of many values.
Using floating-point values causes cumulative errors. These are
most noticable when --total is used because otherwise the graph
self-scales to the width.

This patch adds a --factor option that scales the presented values.
So instead of providing floating point values in the data, the data can
be provided as integers and the result scaled to suit using --factor.

p.s The problem with floats in severe enough that I'd recommend removing
support for them. Just change the regex back to \d+.
cfad672
@timbunce timbunce Only warn about --total being smaller if it's significantly so (e.g.,…
… not rounding etc)
489672a
@brendangregg brendangregg merged commit 4952f87 into brendangregg:master Apr 3, 2013
@brendangregg
Owner

Thanks; yes, we can drop floating point if it is a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.