summaryrefslogtreecommitdiff
path: root/website/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'website/app.js')
-rw-r--r--website/app.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/website/app.js b/website/app.js
index 612cc7af0..27baa1958 100644
--- a/website/app.js
+++ b/website/app.js
@@ -20,6 +20,20 @@ export function createBinarySizeColumns(data) {
return [["binary_size", ...data.map(d => d.binary_size || 0)]];
}
+const threadCountNames = ["set_timeout"];
+export function createThreadCountColumns(data) {
+ return threadCountNames.map(name => [
+ name,
+ ...data.map(d => {
+ const threadCountData = d["thread_count"];
+ if (!threadCountData) {
+ return 0;
+ }
+ return threadCountData[name] || 0;
+ })
+ ]);
+}
+
export function createSha1List(data) {
return data.map(d => d.sha1);
}
@@ -40,6 +54,7 @@ export async function main() {
const execTimeColumns = createExecTimeColumns(data);
const binarySizeColumns = createBinarySizeColumns(data);
+ const threadCountColumns = createThreadCountColumns(data);
const sha1List = createSha1List(data);
c3.generate({
@@ -68,4 +83,15 @@ export async function main() {
}
}
});
+
+ c3.generate({
+ bindto: "#thread-count-chart",
+ data: { columns: threadCountColumns },
+ axis: {
+ x: {
+ type: "category",
+ categories: sha1List
+ }
+ }
+ });
}