google / google/caliper

Transform measurement: 50kbps, etc.

Open
#75 0 comments 0 reactions 0 assignees View on GitHub
component: runner P4 status: started type=enhancement
Dominant language
Java
Stars
818
Forks
112
Avg merge
12m
Merged PRs (30d)
5

Description

```
Should add an option to automatically transform the measurement? The best
practices doc's example kind of needs it. I'm thinking something like this:

@Override double transform(double originalNanos) {
return originalNanos / 100.0;
}

It would also be potentially useful to transform and supply a different unit:
@Units("kB/s") @Override double transform(double originalNanos) {
return (buffer.length / 1024.0) / (originalNanos * 1000000000);
}
```

Original issue reported on code.google.com by `limpbizkit` on 14 Aug 2010 at 6:28

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.