Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dyno: fixes to timing script and infrastructure #26463

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

DanilaFe
Copy link
Contributor

@DanilaFe DanilaFe commented Jan 3, 2025

This PR makes a small fix to the timing script, and adjust testInteractive to allow saving timing information across generations.

The fix to the timing script avoids division by zero (which happens often on my machine). I've run into the issue many times, but each time neglected to submit a simple fix.

The change to testInteractive adds a new --time-all-generations switch to testInteractive which configures it to continue gathering query timings across generations, rather than saving the latest generation's timing and discarding others. This way, it's possible to measure the impact of changes to the query system on performance.

My sample script to gather performance switching back and forth between two files:

#!/bin/bash

# Create a pipe
pipe=/tmp/testpipe

if [[ ! -p $pipe ]]; then
    mkfifo $pipe
fi
echo "Pipe created"

exec 3<>$pipe
echo "Pipe opened"

$(find build -name "testInteractive") domains.main.chpl --std --time $1 --time-all-generations < $pipe &
echo "y" >&3
sleep 10

cp domains.2.chpl domains.main.chpl
echo "y" >&3
sleep 5

cp domains.1.chpl domains.main.chpl
echo "y" >&3
sleep 5

echo "n" >&3
sleep 5

exec 3>&-
rm $pipe

Reviewed by @benharsh -- thanks!

Running the script as ./script somefile, you can then feed somefile into frontend/util/analyze-query-trace.

@DanilaFe DanilaFe merged commit 04e4169 into chapel-lang:main Jan 6, 2025
8 checks passed
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