diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-14 14:25:23 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2020-09-14 14:32:12 +0200 |
commit | cf11b73db00678b45b70108768138d0fb74d9506 (patch) | |
tree | 998e8ce315d63ee373a4c50fc1b21a74f6287dc3 /src/sql | |
parent | 43ed85479fda05bf966328ff2a60a3c33eabca38 (diff) | |
download | cuirass-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.sql | 11 |
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; |