Open kuzeko opened 6 years ago
My 2cents. Do we expect these to be
$QUERY
variable and modify the header.sh
and functions.groovy
... but I doubt this is the case.warmup-$DATABASE.groovy
, and inject its execution in the headers (like previous option).execute.sh
two times, altering the $QUERY
env variable.
It may be as simple as put [ "$QUERY" != "warmup.groovy" ] && QUERY="warmup.groovy" ./$0
before the current call to gremlin.sh
.I think they may be system dependent, but possibly we may want to test different warmups (e.g., a null query - search for non-existing node- vs. a query that scans all nodes/edges) @MartinBrugnara What's the problem that you see there?
I think we can concatenate the warmup-query in /tmp/query
right before
https://github.com/kuzeko/graph-databases-testsuite/blob/16832e6b2a95c209c8234be8a05dce14f40a3ad3/runtime/tp3/execute.sh#L54
I see the solution to issue is not clearly described up there, but we have implemented a fix locally which is now undergoing testing. If things work I will push a pull request
The code to insert should be
else
if [[ ! -f "queries/$QUERY" ]]; then
(>&2 echo "QUERY: 'queries/$QUERY' file does not exists.")
exit 1
fi
grep -v '^#' "queries/warmup.groovy" >> /tmp/query
echo "/** End Warmup **/" >> /tmp/query
echo -e '\n' >> /tmp/query
grep -v '^#' "queries/$QUERY" >> /tmp/query
fi
https://github.com/kuzeko/graph-databases-testsuite/blob/16832e6b2a95c209c8234be8a05dce14f40a3ad3/runtime/tp3/execute.sh#L67-L78
https://github.com/kuzeko/graph-databases-testsuite/blob/16832e6b2a95c209c8234be8a05dce14f40a3ad3/runtime/tp2/execute.sh#L63-L74
Some system execute a series of operation the first time a query (any query) is run after they just started. These bootstrap operations take time, but are 1-off. Would be better to have an option in
test.py
https://github.com/kuzeko/graph-databases-testsuite/blob/16832e6b2a95c209c8234be8a05dce14f40a3ad3/test.py#L434
to indicate if and which query to run as warmup before the real query is executed.