How to generate a report - Maes95/TFG-WebChat GitHub Wiki
This project contains a /docs
folder that, through GitHubPages and Jekyll, generates a static web page.
docs
β _config.yml
β index.md
β
ββββ_ layouts
| β default.html
β
ββββ assets
β generate_results.js
ββββcss
| β style.scss
ββββjs
| β bubble-chart.js
| β line-chart.js
| | results.js
ββββresults
β ... (results in .json)
To generate your own report:
- Put your .json results in
/docs/assets/results/
folder - Go to
/docs/assets/
folder and run:
node generate_results.js
If you push this changes to your master branch in github and goes to https://<your-github-name>.github.io/TFG-WebChat/
, you can see that your results are now include in charts.
Now, you only have to edit index.md
to put your own content and conclusions
To generate a dinamic chart to show your results, you must use the following template
<div width="400" height="400">
<canvas id="canvasId" ></canvas>
</div>
<script>
createChart("canvasId", yAxisLabel, metric, numChatRooms);
</script>
- You must to declare a different canvasId for each chart you put in your report
- Availiable metrics are:
avgTime
avgCpuUse
avgRam
- NumCharRooms only can set to 1,2 or 4
For example:
<div width="400" height="400">
<canvas id="compare-time-1" ></canvas>
</div>
<script>
createChart("compare-time-1", 'Time in milliseconds', "avgTime", 1);
</script>
Disqus is a tool that allows us to insert a comment box on our site for feedback. To incluide your own comment box:
- SignUp in Disqus
- Change the following code in
/docs/_layouts/default.html
var disqus_config = function () {
// Replace PAGE_URL with your page's canonical URL variable
this.page.url = PAGE_URL;
// Replace PAGE_IDENTIFIER with your page's unique identifier variable
this.page.identifier = PAGE_IDENTIFIER;
};