kuzeko / graph-databases-testsuite

Docker Images, installation scripts, and testing & benchmarking suite for Graph Databases
https://graphbenchmark.com
MIT License
35 stars 9 forks source link

Insert hook for warmup-query #5

Open kuzeko opened 6 years ago

kuzeko commented 6 years ago

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.

MartinBrugnara commented 6 years ago

My 2cents. Do we expect these to be

kuzeko commented 6 years ago

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

kuzeko commented 5 years ago

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

In place of https://github.com/kuzeko/graph-databases-testsuite/blob/16832e6b2a95c209c8234be8a05dce14f40a3ad3/runtime/tp3/execute.sh#L48-L55