apache / apache/jmeter

StatCalculator#getDistribution & DistributionGraph#drawSample could be more efficient

Open
#2,912 0 comments 0 reactions 0 assignees View on GitHub
enhancement os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Sebb** ([Bug 53825](https://bz.apache.org/bugzilla//show_bug.cgi?id=53825&redirect=false)):
DistributionGraph#drawSample needs the values in sorted order, so it made sense (originally) for the values to be a pair of numbers that could be sorted.

However, the code now uses the StatCalculator (via SamplingStatCalculator) which by design must use a sorted TreeMap in order to be able to calculate percentiles easily.

It would be easy for the StatCalculator to return the keys and values as some kind of ordered list or array; or indeed just use the entrySet as is, rather than creating a (larger) copy of the entrySet as an unsorted HashMap.

DistributionGraph could in fact use StatCalculator directly.

Whether this is worthwhile fixing is another matter: is the Graph actually useful?

OS: All

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.