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

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Apr 3, 2013

Conversation

Projects
None yet
2 participants
Contributor

timbunce commented Mar 30, 2013

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

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+.

brendangregg added a commit that referenced this pull request Apr 3, 2013

Merge pull request #18 from timbunce/factor2
Add --factor option to scale the presented values.

@brendangregg brendangregg merged commit 4952f87 into brendangregg:master Apr 3, 2013

Owner

brendangregg commented Apr 3, 2013

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