aboutsummaryrefslogtreecommitdiff
path: root/src/sql
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-09-14 14:25:23 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-09-14 14:32:12 +0200
commitcf11b73db00678b45b70108768138d0fb74d9506 (patch)
tree998e8ce315d63ee373a4c50fc1b21a74f6287dc3 /src/sql
parent43ed85479fda05bf966328ff2a60a3c33eabca38 (diff)
downloadcuirass-cf11b73db00678b45b70108768138d0fb74d9506.tar
cuirass-cf11b73db00678b45b70108768138d0fb74d9506.tar.gz
Add metrics support.
* Makefile.am: Add "upgrade-11.sql", "chart.js" and "metrics.js". * bin/cuirass.in (main): Add 'metrics fiber. * src/cuirass/http.scm (%file-white-list): Add "js/chart.js". (url-handler): Add "/metrics" route. * src/cuirass/metrics.scm: New file. * src/cuirass/templates.scm (html-page): Add a "Global metrics" sub-menu to "Status" dropdown menu. (make-line-chart, global-metrics-content): New procedures. * src/schema.sql (Metrics): New table. * src/sql/upgrade-11.sql: New file. * src/static/js/chart.js: New file.
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/upgrade-11.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sql/upgrade-11.sql b/src/sql/upgrade-11.sql
new file mode 100644
index 0000000..22f2dac
--- /dev/null
+++ b/src/sql/upgrade-11.sql
@@ -0,0 +1,11 @@
+BEGIN TRANSACTION;
+
+CREATE TABLE Metrics (
+ field INTEGER NOT NULL,
+ type INTEGER NOT NULL,
+ value DOUBLE PRECISION NOT NULL,
+ timestamp INTEGER NOT NULL,
+ PRIMARY KEY (field, type)
+);
+
+COMMIT;