Adding hour and minute to the benchmark log files.
Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/e8d3f8bc Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/e8d3f8bc Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/e8d3f8bc Branch: refs/heads/vxquery_0_3_staging Commit: e8d3f8bcffd5e96e047776dbdc2a5957f1dd38cf Parents: 1eb4aea Author: Preston Carman <[email protected]> Authored: Tue Apr 8 12:32:57 2014 -0700 Committer: Preston Carman <[email protected]> Committed: Tue Apr 8 12:32:57 2014 -0700 ---------------------------------------------------------------------- .../noaa-ghcn-daily/scripts/run_benchmark.sh | 4 +- .../scripts/run_benchmark_cluster.sh | 63 ++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/e8d3f8bc/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh index 036f697..2dd070c 100755 --- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh @@ -37,10 +37,10 @@ do if [ -z "${3}" ] || [[ "${j}" =~ "${3}" ]] then echo "Running query: ${j}" - log_file="$(basename ${j}).$(date +%Y%m%d).log" + log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log" log_base_path=$(dirname ${j/queries/query_logs}) mkdir -p ${log_base_path} - time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 10000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1 + time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size 10000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1 fi; done http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/e8d3f8bc/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh ---------------------------------------------------------------------- diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh new file mode 100644 index 0000000..6dc9714 --- /dev/null +++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark_cluster.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Run all the queries and save a log. +# First argument: Supply the folder which houses all the queries (recursive). +# Second argument: adds options to the VXQuery CLI. +# +# run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/ +# run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/ "-client-net-ip-address 169.235.27.138" +# run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/ "" q03 +# + +CLUSTER_COUNT=5 + +if [ -z "${1}" ] +then + echo "Please supply a directory for query files to be found." + exit +fi + +# Run queries for each number of nodes. +for (( i = 0; i < ${CLUSTER_COUNT}; i++ )) +do + echo "Starting ${i} cluster nodes" + python vxquery-server/src/main/resources/scripts/cluster_cli.py -c vxquery-server/src/main/resources/conf/${i}nodes.xml -a start + + for j in $(find ${1} -name '*q??.xq') + do + # Only work with i nodes. + if [[ "${j}" =~ "${i}nodes" ]] + then + # Only run for specified queries. + if [ -z "${3}" ] || [[ "${j}" =~ "${3}" ]] + then + echo "Running query: ${j}" + log_file="$(basename ${j}).$(date +%Y%m%d%H%M).log" + log_base_path=$(dirname ${j/queries/query_logs}) + mkdir -p ${log_base_path} + time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -showoet -showrp -frame-size 10000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1 + fi; + fi; + done + + # Stop cluster. + python vxquery-server/src/main/resources/scripts/cluster_cli.py -c vxquery-server/src/main/resources/conf/${i}nodes.xml -a stop +done +
