Gilfeather/furnace

📈 Add performance benchmarking suite

Offen

#12 geöffnet am 16.07.2025

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (5 Forks)auto 404
good first issuehelp wanted

Repository-Metriken

Stars
 (64 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

Create a benchmarking suite to measure and track performance metrics over time.

Current Status - Partially Implemented

The benchmarking infrastructure exists but needs enhancement for comprehensive performance tracking.

Already Implemented

  • ✅ Criterion crate integration in Cargo.toml
  • ✅ benches/ directory structure
  • ✅ Basic benchmark in benches/inference_benchmark.rs
  • ✅ CI job running benchmarks (benchmarks job in ci.yml)

Remaining Work

  • Enhance existing benchmarks for ResNet18 built-in model
  • Add memory usage benchmarking
  • Add throughput benchmarks for different batch sizes
  • Add concurrent request benchmarking
  • Store benchmark results for comparison
  • Add performance regression detection
  • Add HTTP endpoint benchmarking (end-to-end)

Updated Implementation Focus

Since the app now uses built-in ResNet18 model:

  • Benchmark with 150,528 input elements (3×224×224)
  • Test with realistic ImageNet-style input data
  • Measure inference time for built-in model vs dummy fallback
  • Benchmark batch processing (1, 2, 4, 8 images)

Implementation Guidance

  • Enhance existing benches/inference_benchmark.rs
  • Use criterion for Rust benchmarking (already configured)
  • Add benchmarks for the core inference functions with ResNet18
  • Consider using hyperfine for end-to-end HTTP benchmarks
  • Benchmark both successful inference and error cases

Estimated Difficulty

Medium - 1 day (reduced due to existing infrastructure)

Contributor Guide