termbench

Crates.iotermbench
lib.rstermbench
version0.1.1
created_at2025-07-03 20:41:59.484303+00
updated_at2025-07-03 20:41:59.484303+00
descriptionTerminal emulators benchmark
homepage
repositoryhttps://github.com/khulnasoft-lab/starterm
max_upload_size
id1736947
size549,681
KhulnaSoft bot (khulnasoft-bot)

documentation

README

๐Ÿš€ termbench

termbench is a fast, scriptable benchmarking tool focused on measuring PTY read performance in terminal emulators โ€” perfect for comparing how different terminals handle massive streams of output.


โš ๏ธ Disclaimer

This benchmark does not provide a complete overview of terminal performance. It only evaluates how quickly a terminal reads from the PTY, and does not consider:

  • Frame rate
  • Input latency
  • Rendering performance

๐Ÿ“Œ Do not draw broad conclusions from these results unless you're familiar with how PTY internals work.


๐Ÿงช Getting Started

To run all default benchmarks (after setting up a Rust toolchain):

cargo run --release

Benchmarks are located in the ./benchmarks/ directory and are defined as folders containing:

  • benchmark โ€“ the main executable (required)
  • setup โ€“ optional executable for one-time setup

termbench will read the stdout of each benchmark and repeat its output to ensure a meaningful sample size.


๐Ÿ“Š Plotting Results

You can visualize your benchmark results using gnuplot.

1. Generate a .dat file:

cargo run --release -- --dat results.dat

2. Generate a summary SVG plot:

./gnuplot/summary.sh results.dat output.svg

3. Combine multiple results:

./gnuplot/summary.sh *.dat output.svg

4. Detailed per-benchmark plots:

./gnuplot/detailed.sh *.dat output/

๐Ÿงฉ Adding Your Own Benchmarks

Want to contribute or test your own scenarios?

  1. Create a new folder inside ./benchmarks/
  2. Add a benchmark executable (and optionally setup)
  3. Ensure your benchmark writes to stdout
  4. Keep setup-only logic in the setup executable

๐Ÿ“ฌ Feel free to submit a pull request with useful or interesting benchmarks โ€” especially ones that highlight differences between terminal versions or emulators.


๐Ÿ“Ž License

MIT or Apache 2.0 โ€“ choose whichever suits you.


๐Ÿ™Œ Credits

Originally inspired by efforts to stress-test terminal performance in real-world workloads.

Built with ๐Ÿ’™ by the StarTerm team.

Commit count: 0

cargo fmt