RFR: 7451: Add heat map view [v3]
Marcus Hirt
hirt at openjdk.java.net
Fri Dec 3 15:49:12 UTC 2021
On Tue, 30 Nov 2021 22:38:12 GMT, Alex Ciminian <duke at openjdk.java.net> wrote:
>> This PR adds a new plugin (`flightrecorder.heatmap`) which renders a visualisation similar to the one in [this Observable notebook](https://observablehq.com/@cimi/jfr-heatmap).
>>
>> The code is simpler than both the flame view and the graph view, because of less rendering options and less dependencies - the heatmap only requires d3 and currently does not support any user configuration.
>>
>> Each cell represents 100 milliseconds from the recording. We decided to automatically adjust the size of the cell so that the entire heatmap fits inside the window. This is different from the observable notebook which ensured each row represented 6s (i.e. it had a fixed number of 60 columns). The auto-sizing seems to work well with both small and large recordings, although we lose consistency when we resize the window and some periodic patterns are no longer visible when we vary the number of columns.
>>
>> Feedback welcome, here's how this looks now:
>>
>>
>> 
>> (short recording - 2 min)
>>
>>
>> 
>>
>> (long recording - 15 min)
>
> Alex Ciminian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 20 commits:
>
> - Add comment about setting 0 to white in heatmap
> - Clean up logging and unused variables from heatmap.js
> - Add right margin to prevent horizontal scroll
> - Add 'no data' message to heatmap
> - Add heatmap title with event count and start end time
> - Remove right margin, fix axes misalignment
> - Set minimum heatmap cell size to 4px
> - Fix copyright notices
> - Extract heatmap javascript to a separate file to avoid escaping %
> - Remove debug logging from heatmap javascript
> - ... and 10 more: https://git.openjdk.java.net/jmc/compare/ca204424...768ec2a0
Changes requested by hirt (Lead).
application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/heatmap.js line 1:
> 1: class Logger {
Needs a copyright header, see flameview.js.
application/org.openjdk.jmc.flightrecorder.heatmap/src/main/resources/heatmap.js line 3:
> 1: class Logger {
> 2: constructor() {
> 3: this.domElement = document.createElement("pre");
Yes, we're evil, but we're using tabs in javascript too. ;)
-------------
PR: https://git.openjdk.java.net/jmc/pull/337
More information about the jmc-dev
mailing list