Skip to content

Commit

Permalink
Extract Zeek shaper from markdown (#4697)
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz committed Jul 5, 2023
1 parent ca10438 commit 7ba4ecc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/perf-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR" || exit 1

shaper=$(mktemp)
sed -e '1,/```mdtest-input shaper.zed/d' -e '/```/,$d' ../docs/integrations/zeek/shaping-zeek-ndjson.md > "$shaper"

DATA="../zed-sample-data"
ln -sfn zeek-default "$DATA/zeek"
ln -sfn zeek-ndjson "$DATA/ndjson"
Expand Down Expand Up @@ -84,7 +87,7 @@ do
zed=${ZED_QUERIES[$n]}
echo -n "|\`zq\`|\`$zed\`|$INPUT|$OUTPUT|" | tee -a "$MD"
case $INPUT in
ndjson ) zq_flags="-i json -I ../zeek/shaper.zed" zed="| $zed" ;;
ndjson ) zq_flags="-i json -I $shaper" zed="| $zed" ;;
zng-uncompressed ) zq_flags="-i zng" ;;
* ) zq_flags="-i $INPUT" ;;
esac
Expand Down Expand Up @@ -114,3 +117,5 @@ do

echo | tee -a "$MD"
done

rm -f "$shaper"

0 comments on commit 7ba4ecc

Please sign in to comment.