Visualizing the data jungle -- Part III. Excursion to heat maps based on %SYS.MONLBL
Code coverage and performance optimization of code has come up a bunch of times already, so most of you should already be aware of the SYS.MONLBL utility. Often a visual approach to looking at code is much more intuitive than pure numbers, which is pretty much the whole point of this article series. This time we will take a slight excursion away from python and its tools and are going to explore generating heatmaps from ^%SYS.MONLBL reports.
As a quick reminder a heatmap is just a specific visualization tool, which gives us an overview of data where colors represent a certain value. In our case the data is going to be lines of code, with the time being spent in them mapped to colors.
^%SYS.MONLBL
For details about running the line-by-line monitor, check out the documentation. In short, are going to work with the full output of an analysis as CSV file. It is a lot more useful if we actually have the sourcecode to the code we are trying to analyse. Be sure to compile your code with the k flag (keep source).
Prepare the output
As targe output we are going to use a prepared html file. This will just include the very basic layout and a little javascript function to do the final coloring.
Routine Line Total Time Code