Add todos

This commit is contained in:
Joscha 2023-08-15 01:24:21 +02:00
parent 33ca3207e7
commit 146bab4e7c
4 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,7 @@
// TODO Re-think what should be logged, and at what level
// TODO Combine migrations
// TODO Re-enable and adapt CSS
mod args; mod args;
mod config; mod config;
mod id; mod id;

View file

@ -4,3 +4,5 @@ pub mod index;
pub mod queue; pub mod queue;
pub mod run; pub mod run;
pub mod worker; pub mod worker;
// TODO Admin page with vacuum+analyze, deleting output?

View file

@ -16,6 +16,7 @@ use crate::{
somehow, somehow,
}; };
// TODO Metric tree selector in template
#[derive(Template)] #[derive(Template)]
#[template(path = "pages/graph.html")] #[template(path = "pages/graph.html")]
struct Page { struct Page {
@ -45,6 +46,7 @@ pub struct QueryGraphData {
struct GraphData { struct GraphData {
hashes: Vec<String>, hashes: Vec<String>,
times: Vec<i64>, times: Vec<i64>,
// TODO f32 for smaller transmission size?
metrics: HashMap<String, Vec<Option<f64>>>, metrics: HashMap<String, Vec<Option<f64>>>,
} }
@ -75,8 +77,8 @@ pub async fn get_graph_data(
times.push(row.committer_date.unix_timestamp()); times.push(row.committer_date.unix_timestamp());
} }
// TODO Somehow sort topologically if committer_date is the same // TODO Topological sort (s. velcom)
// TODO Overhaul indices once I know how the query looks // TODO Redo indices once queries are finalized
let mut metrics = HashMap::new(); let mut metrics = HashMap::new();
for metric in form.metric { for metric in form.metric {
let values = sqlx::query_scalar!( let values = sqlx::query_scalar!(

View file

@ -37,6 +37,7 @@ impl<'de> serde::Deserialize<'de> for Rfc3339Time {
#[derive(Clone, Serialize_repr, Deserialize_repr, sqlx::Type)] #[derive(Clone, Serialize_repr, Deserialize_repr, sqlx::Type)]
#[repr(u8)] #[repr(u8)]
pub enum Source { pub enum Source {
// TODO Internal = 0 ?
// Stdin would be fd 0 // Stdin would be fd 0
Stdout = 1, Stdout = 1,
Stderr = 2, Stderr = 2,