Skip to content

Add local benchmark mode and Docker support#6

Open
lsk567 wants to merge 3 commits intomainfrom
feature/local-benchmark-mode
Open

Add local benchmark mode and Docker support#6
lsk567 wants to merge 3 commits intomainfrom
feature/local-benchmark-mode

Conversation

@lsk567
Copy link
Contributor

@lsk567 lsk567 commented Jan 22, 2026

Summary

This PR adds support for running timing benchmarks locally without connecting to a remote embedded device, along with Docker support for reproducible environments.

Changes

Benchmark Scripts:

  • Add --local (-l) flag to run_benchmark.py to run benchmarks locally
  • Add local execution functions: local_compile_cmake_project(), local_run_program(), local_run_trace_conversion()
  • Add --local and --select flags to experiment_timing.py
  • Make credentials.py import conditional (only required for remote mode)

Docker Support:

  • Add Dockerfile with all dependencies (Java 17, Python, CMake, RISC-V toolchain, Verilator, etc.)
  • Add docker-compose.yml for convenience

CI:

  • Add GitHub Actions workflow for local benchmark testing

Test plan

  • Tested run_benchmark.py --local --select=PingPong locally
  • Tested experiment_timing.py --local --select=PingPong locally (all 3 schedulers: NP, LB, EGS)
  • Verified CSV trace files and plots are generated correctly
  • CI workflow runs successfully

Usage

# Run single benchmark locally
cd benchmarks
python3 scripts/run_benchmark.py --local --src=src --src-gen=src-gen --select=PingPong

# Run full timing experiment locally
python3 scripts/experiment_timing.py --local --select=PingPong

# Run in Docker
docker build -t emsoft25:local .
docker run -it -v $(pwd):/workspace emsoft25:local
source /setup_env.sh
cd /workspace/lingua-franca && ./gradlew assemble
cd /workspace/benchmarks && python3 scripts/experiment_timing.py --local

🤖 Generated with Claude Code

lsk567 and others added 3 commits January 21, 2026 23:34
- Add --local flag to run_benchmark.py to run benchmarks locally
  without SSH connection to remote embedded device
- Add local execution functions: local_compile_cmake_project(),
  local_run_program(), local_run_trace_conversion()
- Add --local and --select flags to experiment_timing.py
- Make credentials.py import conditional (only for remote mode)
- Add Dockerfile with all dependencies for running benchmarks
- Add docker-compose.yml for convenience
- Add GitHub Actions CI workflow for local benchmark testing
- Update .gitignore to exclude generated data/include directories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
trace_to_csv and trace_to_chrome need to be built from reactor-c
before running benchmarks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only install trace_to_csv and trace_to_chrome, skip trace_to_influxdb
which requires libcurl.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lsk567
Copy link
Contributor Author

lsk567 commented Jan 22, 2026

@copilot please review this PR

Copy link

Copilot AI commented Jan 22, 2026

@lsk567 I've opened a new pull request, #7, to work on those changes. Once the pull request is ready, I'll request review from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants