Skip to content

Commit 7ba4ecc

Browse files
authored
Extract Zeek shaper from markdown (#4697)
1 parent ca10438 commit 7ba4ecc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/perf-compare.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set -eo pipefail
66
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
77
cd "$SCRIPT_DIR" || exit 1
88

9+
shaper=$(mktemp)
10+
sed -e '1,/```mdtest-input shaper.zed/d' -e '/```/,$d' ../docs/integrations/zeek/shaping-zeek-ndjson.md > "$shaper"
11+
912
DATA="../zed-sample-data"
1013
ln -sfn zeek-default "$DATA/zeek"
1114
ln -sfn zeek-ndjson "$DATA/ndjson"
@@ -84,7 +87,7 @@ do
8487
zed=${ZED_QUERIES[$n]}
8588
echo -n "|\`zq\`|\`$zed\`|$INPUT|$OUTPUT|" | tee -a "$MD"
8689
case $INPUT in
87-
ndjson ) zq_flags="-i json -I ../zeek/shaper.zed" zed="| $zed" ;;
90+
ndjson ) zq_flags="-i json -I $shaper" zed="| $zed" ;;
8891
zng-uncompressed ) zq_flags="-i zng" ;;
8992
* ) zq_flags="-i $INPUT" ;;
9093
esac
@@ -114,3 +117,5 @@ do
114117

115118
echo | tee -a "$MD"
116119
done
120+
121+
rm -f "$shaper"

0 commit comments

Comments
 (0)