Last active
December 13, 2020 22:14
-
-
Save davaymne/b638165960f16801735d84a211667bcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Loga may contain different subgraphs - filter subgrafs manualy first of all | |
NAME_BASE=$(echo $1 | cut -d'.' -f 1) | |
SUMMARY_JSONL="${NAME_BASE}-summary.jsonl" | |
OUTPUT_JSONL="${NAME_BASE}.jsonl" | |
TREEBUF="${NAME_BASE}.treebuf" | |
AGORA=<PATH>agora1/agora/target/release/agora | |
echo "Converting log to jsonl $1" | |
grep 'Query timing' $1 | qlog process --text --graphql $SUMMARY_JSONL --output $OUTPUT_JSONL | |
echo "Agora..." | |
sed -i 's/\\"/"/g' $OUTPUT_JSONL | |
sed -i 's/\\"/"/g' $OUTPUT_JSONL | |
sed -i 's/\\"/"/g' $SUMMARY_JSONL | |
sed -i 's/\\"/"/g' $SUMMARY_JSONL | |
sed -i 's/time/effort/g' $OUTPUT_JSONL | |
$AGORA --load-log $OUTPUT_JSONL --sample 1 --save-log $TREEBUF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment