blob: 4261bfb3cec708668fff0d5b18b0fc885ab3dccd [file] [log] [blame]
[comment encoding = UTF-8 /]
[comment /*******************************************************************************
* Copyright (c) 2012, 2015 INRIA, and Mia-Software and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v2.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Guillaume Doux (INRIA) - Initial API and implementation
* Grégoire Dupé (Mia-Software) - Bug 482672 - Benchmark command line interface
* Grégoire Dupé (Mia-Software) - Bug 482857 - Discoverer Benchmark Report : wrong namespaces
* Grégoire Dupé (Mia-Software) - Bug 483400 - The input size should be computable by the discoverer
******************************************************************************/ /]
[module HtmlReport(
'http://www.eclipse.org/modisco/infra/discovery/benchmark/0.11.incubation/internal/benchmark',
'http://www.eclipse.org/MoDisco/Discovery/0.1.incubation/discovery/catalog',
'http://www.eclipse.org/MoDisco/Discovery/0.1.incubation/discovery/launch')
/]
[query public maxExecutionTime (iterations : Set(DiscoveryIteration)) : Real = invoke('org.eclipse.modisco.infra.discovery.benchmark.core.internal.reporting.internal.ReportingUtilities', 'maxExecutionTime(java.util.Collection)', Sequence{iterations})/]
[query public maxSaveTime (iterations : Set(DiscoveryIteration)) : Real = invoke('org.eclipse.modisco.infra.discovery.benchmark.core.internal.reporting.internal.ReportingUtilities', 'maxSaveTime(java.util.Collection)', Sequence{iterations})/]
[query public sizeWithUnit (value : Real) : String = invoke('org.eclipse.modisco.infra.discovery.benchmark.core.internal.reporting.internal.ReportingUtilities', 'sizeWithUnit(java.lang.Double)', Sequence{value})/]
[query public timeWithUnit (value : Real) : String = invoke('org.eclipse.modisco.infra.discovery.benchmark.core.internal.reporting.internal.ReportingUtilities', 'timeWithUnit(java.lang.Double)', Sequence{value})/]
[query public indexOf (list : Sequence(OclAny), object : OclAny) : Integer =
invoke(
'org.eclipse.modisco.infra.discovery.benchmark.core.internal.reporting.internal.ReportingUtilities',
'indexOf(java.util.List, java.lang.Object)', Sequence{list, object})/]
[template public HtmlReport(b : Benchmark)]
[comment @main /]
[reportIndex(b)/]
[for (discovery : Discovery | b.discoveries) ]
[discovererReport(discovery)/]
[/for]
[for (discovery : Discovery | b.discoveries) ]
[discoveryReport(discovery)/]
[/for]
[for (project : Project | b.projects) ]
[projectReport(project, b)/]
[/for]
[/template]
[template private reportIndex(b : Benchmark)]
[file ('discoveryReport.html', false, 'UTF-8')]
[head('MoDisco Java Discover Benchmark')/]
<h2>System Information</h2>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>OS name</th>
<td>[b.osName/]</td>
</tr>
<tr>
<th>OS version</th>
<td>[b.osVersion/]</td>
</tr>
<tr>
<th>OS architecture</th>
<td>[b.osArchitecture/]</td>
</tr>
<tr>
<th>Number of processor cores</th>
<td>[b.processorCount/]</td>
</tr>
<tr>
<th>Processor name</th>
<td>[b.processorName/]</td>
</tr>
<tr>
<th>Processor description</th>
<td>[b.processorDescription/]</td>
</tr>
<tr>
<th>Processor cache size</th>
<td>[b.processorCacheSize/]</td>
</tr>
<tr>
<th>System memory</th>
<td>[b.systemMemory/]</td>
</tr>
</table>
<h2>Execution time by project size</h2>
<img src="DiscoveryTimeByProjectSizeOverall.png"/>
[if (b.discoveries->first().iterations->first().maxUsedMemoryInBytes<>0)]
<h2>Memory use time by project size</h2>
<img src="memoryByProjectSizeOverall.png"/>
[/if]
<h2>Results Overview</h2>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Project</th>
<th>Discoverer</th>
<th>Discoveries</th>
<th>Project size</th>
<th>Average discovery time</th>
<th>Average save time</th>
<th>Number of model elements</th>
</tr>
[for (discovery : Discovery | b.discoveries) ]
<tr>
<td><a href="Report/[discovery.project.name/].html">[discovery.project.name/]</a></td>
<td><a href="Report/[discovery.discovererId/].html">[discovery.discovererId/]</a></td>
<td><a href="Report/[discovery.project.name+'/'+discovery.discovererId/].html">Discoveries</a></td>
<td>[discovery.project.oclAsType(Project).inputSize/][discovery.project.oclAsType(Project).inputSizeUnit/]</td>
<td>[timeWithUnit(0.0 + discovery.discoveryTimeAverageInSeconds)/] (&sigma; = [timeWithUnit(0.0 + discovery.executionTimeStandardDeviation)/]s)</td>
<td>[timeWithUnit(0.0 + discovery.saveTimeAverageInSeconds)/] (&sigma; = [timeWithUnit(0.0 + discovery.saveTimeStandardDeviation)/]s)</td>
<td>[discovery.numberOfModelElements/]</td>
</tr>
[/for]
</table>
[if (b.discoveries->first().iterations->size() > 1)]
<h2>Execution times per iteration</h2>
[for (discovery : Discovery | b.discoveries) ]
<h3>[discovery.project.name/] with <a href="Report/[discovery.discovererId+discovery.project.name/].html">[discovery.discovererId/]</a></h3>
[let maxExecutionTime : Real = maxExecutionTime(discovery.iterations)]
<table width="600" class="graph" cellspacing="6" cellpadding="0">
<tr>
<th>iteration</th><th>relative execution time</th><th>time</th>
</tr>
[for (discoveryIteration : DiscoveryIteration | discovery.iterations)]
<tr>
<td>[i/]/[discovery.iterations->size()/]</td><td class="bar"><div style="width: [discoveryIteration.discoveryTimeInSeconds / maxExecutionTime * 100.0/]%"></div></td><td>[timeWithUnit(0.0 + discoveryIteration.discoveryTimeInSeconds)/]</td>
</tr>
[/for]
</table>
[/let]
[/for]
<h2>Save times per iteration</h2>
[for (discovery : Discovery | b.discoveries) ]
<h3>[discovery.project.name/] with <a href="Report/[discovery.discovererId+discovery.project.name/].html">[discovery.discovererId/]</a></h3>
[let maxSaveTime : Real = maxSaveTime(discovery.iterations)]
<table width="600" class="graph" cellspacing="6" cellpadding="0">
<tr>
<th>iteration</th><th>relative save time</th><th>time(s)</th>
</tr>
[for (discoveryIteration : DiscoveryIteration | discovery.iterations)]
<tr>
<td>[i/]/[discovery.iterations->size()/]</td><td class="bar"><div style="width: [discoveryIteration.saveTimeInSeconds / maxSaveTime * 100.0/]%"></div></td><td>[timeWithUnit(0.0 + discoveryIteration.saveTimeInSeconds)/]</td>
</tr>
[/for]
</table>
[/let]
[/for]
[/if]
<p/>
<hr/>
<font size="-1"><i>This report has been generated with <a href="http://www.eclipse.org/MoDisco/">MoDisco</a> Java Discoverer Benchmark.</i></font>
</body></html>
[/file]
[/template]
[template public discoveryReport(discovery : Discovery)]
[file ('Report/'+discovery.project.name+'/'+discovery.discovererId+'.html', false, 'UTF-8')]
[head(discovery.name+' on '+discovery.project.name)/]
<h2>General discovery information</h2>
<b>name</b>: [discovery.name/]<br/>
<b>discoverer</b>: [discovery.discovererId/] ([discovery.discovererClassName/])<br/>
<b>average discovery time in seconds</b>: [timeWithUnit(0.0 + discovery.discoveryTimeAverageInSeconds)/]<br/>
<b>average save time in seconds</b>: [timeWithUnit(0.0 + discovery.saveTimeAverageInSeconds)/]<br/>
<b>execution time standard deviation</b>: [timeWithUnit(0.0 + discovery.executionTimeStandardDeviation)/]<br/>
<b>save time standard deviation</b>: [timeWithUnit(0.0 + discovery.saveTimeStandardDeviation)/]<br/>
<b>number of model elements</b>: [discovery.numberOfModelElements/]<br/>
<b>size of the xmi file in bytes</b>: [sizeWithUnit(0.0 + discovery.xmiSizeInBytes)/]<br/>
<h3>Project information</h3>
<b>Project name</b>: <a href="[discovery.project.name/].html">[discovery.project.name/]</a><br/>
<b>total number of lines</b>: [discovery.project.oclAsType(Project).totalLines/]<br/>
<b>average number of lines per files</b>: [discovery.project.oclAsType(Project).averageLinesPerFile/]<br/>
<b>average file size in bytes</b>: [sizeWithUnit(0.0 + discovery.project.oclAsType(Project).averageFileSizeInBytes)/]<br/>
<b>total size in bytes</b>: [sizeWithUnit(0.0 + discovery.project.totalSizeInBytes)/]<br/>
[for (iteration : DiscoveryIteration | discovery.iterations) separator ('<hr/>')]
<h2>iteration [i/]</h2>
<b>date</b>: [iteration.discoveryDate/]<br/>
<b>save time</b>: [timeWithUnit(0.0 + iteration.saveTimeInSeconds)/]<br/>
<b>discovery time</b>: [timeWithUnit(0.0 + iteration.discoveryTimeInSeconds)/]<br/>
<b>max used memory</b>: [sizeWithUnit(0.0 + iteration.maxUsedMemoryInBytes)/]<br/>
<img src="[discovery.discovererId/]/memoryByTime-[indexOf(discovery.iterations->asSequence(),iteration)/].png"/>
[if (not iteration.discoveryErrors.oclIsUndefined())]
<font color="red">
<h3>discovery errors</h3>
[for (error : String | iteration.discoveryErrors) ]
[error/]<br/>
</font>
[/for]
[/if]
[/for]
<hr/>
<font size="-1"><i>This report has been generated with <a href="http://www.eclipse.org/MoDisco/">MoDisco</a> Java Discoverer Benchmark.</i></font>
</body></html>
[/file]
[/template]
[template private projectReport(project : Project, b : Benchmark)]
[file ('Report/'+project.name+'.html', false, 'UTF-8')]
[head(project.oclAsType(Project).name)/]
<h2>Project information</h2>
<b>Project name</b>: <a href="Report/[project.oclAsType(Project).name/].html">[project.oclAsType(Project).name/]</a><br/>
<b>total number of lines</b>: [project.oclAsType(Project).totalLines/]<br/>
<b>average number of lines per files</b>: [project.oclAsType(Project).averageLinesPerFile/]<br/>
<b>average file size in bytes</b>: [sizeWithUnit(0.0 + project.oclAsType(Project).averageFileSizeInBytes)/]<br/>
<b>total size in bytes</b>: [sizeWithUnit(0.0 + project.totalSizeInBytes)/]<br/>
<h2>Discoveries on the project</h2>
<h3>Results Overview</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<th>Project</th>
<th>Discoverer</th>
<th>Average discovery time</th>
<th>Average save time</th>
<th>Number of model elements</th>
<th>Total size</th>
<th>Average file size</th>
<th>Total lines</th>
<th>Average lines per file</th>
<th>XMI size</th>
</tr>
[for (discovery : Discovery | b.discoveries)]
[if (discovery.project=project)]
<tr>
<td><a href="[discovery.project.name/].html">[discovery.project.name/]</a></td>
<td><a href="[discovery.project.name+'/'+discovery.discovererId/].html">[discovery.discovererId/]</a></td>
<td>[timeWithUnit(0.0 + discovery.discoveryTimeAverageInSeconds)/] (&sigma; = [timeWithUnit(0.0 + discovery.executionTimeStandardDeviation)/]s)</td>
<td>[timeWithUnit(0.0 + discovery.saveTimeAverageInSeconds)/] (&sigma; = [timeWithUnit(0.0 + discovery.saveTimeStandardDeviation)/]s)</td>
<td>[discovery.numberOfModelElements/]</td>
<td>[sizeWithUnit(0.0 + discovery.project.oclAsType(Project).totalSizeInBytes)/]</td>
<td>[sizeWithUnit(0.0 + discovery.project.oclAsType(Project).averageFileSizeInBytes)/]</td>
<td>[discovery.project.oclAsType(Project).totalLines/]</td>
<td>[discovery.project.oclAsType(Project).averageLinesPerFile/]</td>
<td>[sizeWithUnit(0.0 +discovery.xmiSizeInBytes)/]</td>
</tr>
[/if]
[/for]
</table>
<h3>Detailed Information</h3>
[for (discovery : Discovery | b.discoveries)]
[if (discovery.project=project)]
[if (discovery.iterations->size() > 1)]
<h4>Execution times per iteration</h4>
<h5><a href="[discovery.project.name/].html">[discovery.project.name/]</a> with <a href="[discovery.discovererId+discovery.project.name/].html">[discovery.discovererId/]</a></h5>
[let maxExecutionTime : Real = maxExecutionTime(discovery.iterations)]
<table width="600" class="graph" cellspacing="6" cellpadding="0">
<tr>
<th>iteration</th><th>relative execution time</th><th>time</th>
</tr>
[for (discoveryIteration : DiscoveryIteration | discovery.iterations)]
<tr>
<td>[i/]/[discovery.iterations->size()/]</td><td class="bar"><div style="width: [discoveryIteration.discoveryTimeInSeconds / maxExecutionTime * 100.0/]%"></div></td><td>[timeWithUnit(0.0 + discoveryIteration.discoveryTimeInSeconds)/]</td>
</tr>
[/for]
</table>
[/let]
[/if]
[/if]
[/for]
[for (discovery : Discovery | b.discoveries)]
[if (discovery.project=project)]
[if (discovery.iterations->size() > 1)]
<h4>Save times per iteration</h4>
<h5><a href="[discovery.project.name/].html">[discovery.project.name/]</a> with <a href="[discovery.discovererId+discovery.project.name/].html">[discovery.discovererId/]</a></h5>
[let maxSaveTime : Real = maxSaveTime(discovery.iterations)]
<table width="600" class="graph" cellspacing="6" cellpadding="0">
<tr>
<th>iteration</th><th>relative save time</th><th>time(s)</th>
</tr>
[for (discoveryIteration : DiscoveryIteration | discovery.iterations)]
<tr>
<td>[i/]/[discovery.iterations->size()/]</td>
<td class="bar"><div style="width: [discoveryIteration.saveTimeInSeconds / maxSaveTime * 100.0/]%"></div></td>
<td>[timeWithUnit(0.0 + discoveryIteration.saveTimeInSeconds)/]</td>
</tr>
[/for]
</table>
[/let]
[/if]
[/if]
[/for]
[for (discovery : Discovery | b.discoveries)]
[if (discovery.project=project)]
[for (iteration : DiscoveryIteration | discovery.iterations)]
[if (not iteration.discoveryErrors.oclIsUndefined())]
<font color="red">
<h2>discovery errors for <a href="[discovery.discovererId+discovery.project.name/].html">[discovery.discovererId/]</a> on <a href="[discovery.project.name/].html">[discovery.project.name/]</a>:</h2>
[for (error : String | iteration.discoveryErrors) ]
[error/]<br/>
</font>
[/for]
[/if]
[/for]
[/if]
[/for]
<p/>
<hr/>
<font size="-1"><i>This report has been generated with <a href="http://www.eclipse.org/MoDisco/">MoDisco</a> Java Discoverer Benchmark.</i></font>
</body></html>
[/file]
[/template]
[template private discovererReport(discovery : Discovery)]
[file ('Report/'+discovery.discovererId+'.html', false, 'UTF-8')]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
[style()/]
<title>[discovery.name/]</title>
</head>
<body>
<h1>[discovery.name/]</h1>
<h2>General discovery information</h2>
<b>name</b>: [discovery.name/]<br/>
<b>discoverer</b>: [discovery.discovererId/] ([discovery.discovererClassName/])<br/>
<img src="avgTimeBySize_[discovery.discovererId/].png"/>
[if (discovery.iterations->first().maxUsedMemoryInBytes<>0)]
<img src="avgMemoryByProjectSize_[discovery.discovererId/].png"/>
[/if]
<hr/>
<font size="-1"><i>This report has been generated with <a href="http://www.eclipse.org/MoDisco/">MoDisco</a> Java Discoverer Benchmark.</i></font>
</body></html>
[/file]
[/template]
[template private style(any : OclAny)]
<style type="text/css">
.graph {
background-color: #E0E0E0;
border: solid 1px black;
}
.graph td {
font-family: verdana, arial, sans serif;
}
.bar {
background-color: white;
text-align: right;
border: solid 1px black;
width: 400px;
}
.bar div {
background-color: #A0A0FF;
text-align: right;
float: left;
height: 20px;
}
body {
background-color: white;
}
td {
text-align: center;
}
</style>
[/template]
[template private head(title : String)]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
[style()/]
<title>[title/]</title>
</head>
<body>
<h1>[title/]</h1>
[/template]