Skip to content

Add non-interactive and real-time visualization generation support to…#20

Open
aiqubits wants to merge 7 commits intonubskr:masterfrom
aiqubits:master
Open

Add non-interactive and real-time visualization generation support to…#20
aiqubits wants to merge 7 commits intonubskr:masterfrom
aiqubits:master

Conversation

@aiqubits
Copy link
Copy Markdown

… 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

simbiont666 and others added 5 commits December 5, 2025 11:01
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.
@nubskr
Copy link
Copy Markdown
Owner

nubskr commented Jan 22, 2026

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 visualize_throughput.py and visualize_batch_benchmark.py instead? Something like:

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 --single-shot and --max-frames options could be added to the existing realtime mode as well.

@aiqubits
Copy link
Copy Markdown
Author

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 visualize_throughput.py and visualize_batch_benchmark.py instead? Something like:

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 --single-shot and --max-frames options could be added to the existing realtime mode as well.

After receiving feedback, I have newly submitted a PR to modify and merge the headless visualization into the original file.

@aiqubits
Copy link
Copy Markdown
Author

Deprecated headless visualization script has been removed.

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.

3 participants