Kouhei Sutou
null+****@clear*****
Thu Nov 10 23:35:51 JST 2016
Kouhei Sutou 2016-11-10 23:35:51 +0900 (Thu, 10 Nov 2016) New Revision: f56073b204f09aa78775e18dcc2ae44ad7fde0db https://github.com/groonga/wikipedia-search/commit/f56073b204f09aa78775e18dcc2ae44ad7fde0db Message: Benchmark pgroonga.command Modified files: benchmark/centos7/postgresql.sh Modified: benchmark/centos7/postgresql.sh (+16 -0) =================================================================== --- benchmark/centos7/postgresql.sh 2016-11-10 23:30:35 +0900 (3ab26c9) +++ benchmark/centos7/postgresql.sh 2016-11-10 23:35:51 +0900 (ad74bd5) @@ -418,6 +418,19 @@ benchmark_search_pgroonga() done } +benchmark_search_pgroonga_command() +{ + cat "${benchmark_dir}/${word_list}" | while read search_word; do + commands=() + commands+=("--command" "\\timing") + for i in $(seq ${n_search_tries}); do + commands+=("--command" "SELECT pgroonga.command('select ' || pgroonga.table_name('wikipedia_index_pgroonga') || ' --match_columns text --query \"${search_word}\" --limit 0 --output_columns _id") + done + echo "PGroonga: command: search: ${search_word}:" + run sudo -u postgres -H psql -d ${pgroonga_db} "${commands[@]}" + done +} + benchmark_search_pg_bigm() { work_mem="SET work_mem = '${work_mem_size}';" @@ -480,6 +493,9 @@ benchmark_search() { for target in "${targets[@]}"; do benchmark_search_${target} + if [ "${target}" = "pgroonga" ]; then + benchmark_search_pgroonga_command + fi done } -------------- next part -------------- HTML����������������������������...Download