Raw data output
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Jul 12 19:58:29 UTC 2016
Hi Petr,
Sorry for late reply.
On 06/21/2016 06:02 PM, Petr Stefan wrote:
> But now, JMH doesn't support collecting very raw data (rawData list
> from JSON output holds just mean from each iteration - except
> SingleShot benchmarking mode where the mean is the actual value). But
> we found out, that Statistics class (all it's implementations) has
> the raw data inside, so we propose a patch, which adds a getter for
> this data.
Yes, I understand the problem. Current raw_data is not usable for most
scenarios, so I don't mind changing it.
> Please look at proposed changes and give me a feedback. We're open to
> changes and improvements.
Comments:
*) Sign the OCA (http://openjdk.java.net/contribute/) as soon as
possible -- processing takes time.
*) No need for separate patches. The change would have go in as a
single changeset anyway.
*) No need for a separate JSON formatter. Keeping both non-raw and raw
versions in sync would be a hassle, so let's just fix the current JSON
formatter.
*) We would need to be able to trim/disable raw_data printing in JSON
output. The common way in JMH is to use system properties. Something
like boolean "jmh.json.rawData" would be fine.
*) It is better to return Iterator from Statistics.getRawData(). I
understand you want Iterable for for-each loops. You can create an
utility method in Utils that adapts Iterator to Iterable for this.
*) Iterator.remove() should throw UnsupportedOperationException.
*) RawJSONResultFormat.getConcatenation is replaceable with Utils.join.
Thanks,
-Aleksey
More information about the jmh-dev
mailing list