Skip to content

Commit

Permalink
Update report.cfm
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 15, 2024
1 parent 499055c commit 406705b
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion custom/benchmark/report.cfm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
q = queryNew("version,java,type,runs,inspect,memory")
for (f in files){
systemOutput ( f, true );
json = deserializeJson( fileRead( t ) );
json = deserializeJson( fileRead( f ) );
memory = 0;
for ( m in json.memory.usage ){
if ( isNumeric( json.memory.usage[ m ] ) )
memory += json.memory.usage[ m ];
}
json.run.memory = memory;
for ( r in json.data ){
StructAppend( r, json.run );
row = queryAddRow( q );
Expand Down Expand Up @@ -53,4 +61,20 @@
<cfscript>
_logger( "![#inspect# Benchmarks](data:image/png;base64,#toBase64( graph )#)" );
</cfscript>
</cfloop>

<!--- memory data is the same accross all runs anyway --->
<cfloop list="none" item="_inspect">
<cfchart chartheight="500" chartwidth="1024" title="Memory Benchmarks" format="png" name="graph">
<cfchartseries type="line" seriesLabel="Memory">
<cfloop query="q">
<cfif q.type eq "hello-world" and q.inspect eq _inspect>
<cfchartdata item="#q.version# #q.java#" value="#q.memory#">
</cfif>
</cfloop>
</cfchartseries>
</cfchart>
<cfscript>
_logger( "!Memory Benchmarks](data:image/png;base64,#toBase64( graph )#)" );
</cfscript>
</cfloop>

0 comments on commit 406705b

Please sign in to comment.