build: add multi measurement query benchmarks (#22217)

* build: add multi measurement query benchmarks

* chore: add comment for default match of query interval
pull/22232/head
William Baker 2021-08-17 10:35:05 -06:00 committed by GitHub
parent d677fa1eeb
commit 2bf5f8ef3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 2 deletions

View File

@ -261,7 +261,7 @@ query_types() {
echo min-high-card mean-high-card max-high-card first-high-card last-high-card count-high-card sum-high-card min-low-card mean-low-card max-low-card first-low-card last-low-card count-low-card sum-low-card echo min-high-card mean-high-card max-high-card first-high-card last-high-card count-high-card sum-high-card min-low-card mean-low-card max-low-card first-low-card last-low-card count-low-card sum-low-card
;; ;;
iot) iot)
echo 1-home-12-hours light-level-8-hr aggregate-keep sorted-pivot echo 1-home-12-hours light-level-8-hr aggregate-keep sorted-pivot battery-levels
;; ;;
metaquery) metaquery)
echo field-keys tag-values echo field-keys tag-values
@ -273,6 +273,20 @@ query_types() {
esac esac
} }
query_interval() {
case $1 in
battery-levels)
echo -query-interval=5m
;;
*)
# If a query interval is not matched in the cases above, do not pass this
# flag at all to the query generation tool so that the default value from
# the query generation tool can be used.
echo ""
;;
esac
}
# Generate queries to test. # Generate queries to test.
query_files="" query_files=""
for usecase in window-agg group-agg bare-agg group-window-transpose iot metaquery; do for usecase in window-agg group-agg bare-agg group-window-transpose iot metaquery; do
@ -285,7 +299,8 @@ for usecase in window-agg group-agg bare-agg group-window-transpose iot metaquer
-timestamp-start=$(start_time $usecase $type) \ -timestamp-start=$(start_time $usecase $type) \
-timestamp-end=$(end_time $usecase $type) \ -timestamp-end=$(end_time $usecase $type) \
-queries=$queries \ -queries=$queries \
-scale-var=$scale_var > \ -scale-var=$scale_var \
$(query_interval $type) > \
${DATASET_DIR}/$query_fname ${DATASET_DIR}/$query_fname
query_files="$query_files $query_fname" query_files="$query_files $query_fname"
done done