-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgraph.html
51 lines (50 loc) · 1.92 KB
/
graph.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript">
google.charts.load('current', {
packages: ['corechart'],
callback: drawChart
});
function drawChart() {
var dataSource = new google.visualization.arrayToDataTable([
['Framework', 'Response', 'Graal'],
["Spring", StartedDemoApplication, GRAALSPRING],
["Webflux", StartedDemoWebFluxApplication, GRAALWEBFLUX],
["Quarkus", QUARKUS, GRAALQ1UARKUS],
["Micronaut", Startupcompletedin, GRAALM1ICRONAUT],
['Vertx', VERTX, GRAALV1ERTX],
['Ktor', KTOR, GRAALK1TOR],
['Helidon', HELIDON, GRAALH1ELIDON],
['Kumuluz', ServerStarted, 0],
['R-Rocket', ROCKET, 0],
['RustAxum', AXUM, 0],
['R-Actix', ACTIX, 0],
['R-Warp', WARP, 0],
['.net 7 AOT', DOTNET7AOT, 0],
['.net 8 AOT', DOTNET8AOT, 0],
['.net 9 AOT', DOTNET9AOT, 0],
]);
const newDiv = document.createElement("div");
var chart = new google.visualization.ColumnChart(newDiv);
var view = new google.visualization.DataView(dataSource);
view.setColumns([0, 1,
{ calc: "stringify",
sourceColumn: 1,
type: "string",
role: "annotation" },
2,{ calc: "stringify",
sourceColumn: 2,
type: "string",
role: "annotation" },]);
const chartOptions = {
width: 1380,
height: 400,
is3D: true,
vAxis: {title: 'Mean response in milli seconds'},
bar: {groupWidth: "95%"},
title: "Frameworks vs JVM vs Rust vs Graal(lower is the better/faster)",
'chartArea': {'width': '80%', 'height': '80%'},
};
chart.draw(view, chartOptions);
document.getElementsByClassName('post-content').item(0).prepend(newDiv);
}
</script>