Gilfeather/furnace

📈 Add performance benchmarking suite

开放

#12 创建于 2025年7月16日

 (0 条评论) (0 个反应) (0 位负责人)Rust (5 个派生)auto 404
good first issuehelp wanted

仓库指标

星标
 (64 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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)

贡献者指南