Benchmarking Guide — Dine-In Order Accuracy#
This guide covers performance testing, stream density benchmarking, and metrics collection for the Dine-In Order Accuracy system.
Note — Inference Device: The default device is
GPU. To switch toCPU, you must do both steps below, otherwise the model will be exported for the wrong device:
Set both variables in your
.envfile:TARGET_DEVICE=GPU # used by setup_models.sh and docker-compose OPENVINO_DEVICE=GPU # used by the Makefile benchmark targetsRe-export the model for the new device:
cd ../ovms-service && ./setup_models.sh --app dine-in
TARGET_DEVICEis whatsetup_models.shreads to export the model in the correct format.OPENVINO_DEVICEis what the Makefile passes to the benchmark script. Both must match.
Prerequisites#
# 1. Initialize git submodules (first time only)
make update-submodules
# 2. Start services
make up
Important: The
images/folder does not contain sample images. Add your own before testing:
Place plate images in
images/(.jpg,.jpeg, or.png)Edit
configs/orders.json— add entries withimage_idmatching your filenamesEdit
configs/inventory.json— define all possible menu items
Benchmark Commands#
Single Image Test#
make benchmark-single IMAGE_ID=MCD-1001
Full Benchmark#
make benchmark
Note:
make benchmarkuses Docker profiles to start worker containers. Both thedine-inapp anddinein-workerservices use the same Docker image (built from the same Dockerfile). The worker is simply the same container runningworker.pyinstead of the UI.
Variables:
Variable |
Default |
Description |
|---|---|---|
|
1 |
Concurrent workers |
|
180 |
Duration (seconds) |
|
25000 |
Latency threshold (ms) |
|
GPU |
Device: CPU, GPU |
Stream Density Benchmark#
Finds the maximum number of concurrent image validations within the latency target:
make benchmark-stream-density
# With overrides
make benchmark-stream-density BENCHMARK_TARGET_LATENCY_MS=20000 BENCHMARK_INIT_DURATION=30
Note:
make benchmark-densityruns a Python script locally that sends concurrent HTTP requests to the runningdine-inAPI. No separate worker containers are needed for this mode.
Metrics Processing#
# Consolidate metrics from multiple runs into a single CSV
make consolidate-metrics
# Generate plots from consolidated metrics
make plot-metrics