Files
knifer/analysis/tests/heatmap.rs
Lol3rrr 83b4a24b15 Add Heatmaps to UI
Add Heatmap analysis to website as well as a basic UI for viewing the Heatmaps.
There are still issues, like some players not getting a heatmap assigned and heatmaps including data
from warmup etc.
2024-09-29 00:32:20 +02:00

23 lines
611 B
Rust

use analysis::heatmap;
use tracing_test::traced_test;
#[test]
#[traced_test]
fn heatmap_nuke() {
let path = concat!(env!("CARGO_MANIFEST_DIR"), "/../testfiles/nuke.dem");
dbg!(path);
let input_bytes = std::fs::read(path).unwrap();
let config = heatmap::Config { cell_size: 5.0 };
let (result, players) = heatmap::parse(&config, &input_bytes).unwrap();
for (user, mut heatmap) in result {
heatmap.shrink();
let image = heatmap.as_image();
image.save_with_format(format!("./heatmap_nuke-{}.png", user.0), image::ImageFormat::Png).unwrap();
}
todo!()
}