[Rev 02] RFR: 6674: Optimize finding of first start time and first & last end times

Marcus Hirt hirt at openjdk.java.net
Mon Jan 20 21:37:21 UTC 2020

On Mon, 20 Jan 2020 21:37:20 GMT, Henrik Dafgård <hdafgard at openjdk.org> wrote:

>> This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively.
>> This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods.
> The pull request has been updated with 1 additional commit.

core/org.openjdk.jmc.flightrecorder.rules/src/main/java/org/openjdk/jmc/flightrecorder/rules/util/RulesToolkit.java line 1402:

> 1401: 	 * Returns the earliest end time in the provided item collection. This method is based on the
> 1402: 	 * assumption that item collection lanes are sorted by timestamp.
> 1403: 	 * 

...and that they are not overlapping.


PR: https://git.openjdk.java.net/jmc/pull/31

More information about the jmc-dev mailing list