Add non-interactive and real-time visualization generation support to…#20
Add non-interactive and real-time visualization generation support to…#20aiqubits wants to merge 7 commits intonubskr:masterfrom
Conversation
fix: make octopii examples build successfully
… throughput benchmark script in Walrus. The usage is as follows: WALRUS_FSYNC=no-fsync WALRUS_DURATION=2m cargo test --release --test multithreaded_benchmark_writes python scripts/visualize_throughput_noninteractive.py --file benchmark_throughput.csv python scripts/visualize_throughput_noninteractive.py --file benchmark_throughput.csv --single-shot --output test_non_interactive.png
This script visualizes batch benchmark results in a non-interactive manner, generating real-time graphs and saving them as images. It supports various modes including real-time monitoring and single-shot plotting.
|
Thanks for the PR! Headless support is useful for CI/remote servers, but I'd prefer not to maintain two nearly-identical scripts. Could you modify the existing parser.add_argument('--headless', action='store_true', help='Save to file instead of displaying (for environments without a display)')
parser.add_argument('--output', '-o', help='Output file path (implies --headless)')
args = parser.parse_args()
if args.headless or args.output:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
# ... existing code ...
# At the end:
if args.output:
plt.savefig(args.output, dpi=150, bbox_inches='tight')
else:
plt.show()This way we get headless support without duplicating all the plotting logic. The |
…dless support files.
After receiving feedback, I have newly submitted a PR to modify and merge the headless visualization into the original file. |
|
Deprecated headless visualization script has been removed. |
… throughput benchmark script in Walrus.
The usage is as follows:
WALRUS_FSYNC=no-fsync WALRUS_DURATION=2m cargo test --release --test multithreaded_benchmark_writes python scripts/visualize_throughput_noninteractive.py --file benchmark_throughput.csv python scripts/visualize_throughput_noninteractive.py --file benchmark_throughput.csv --single-shot --output test_non_interactive.png