Skip to content

Commit

Permalink
[benchmarks] add SameTabletConcurrentWritesTest scenarios
Browse files Browse the repository at this point in the history
Added a new benchmarks for SameTabletConcurrentWritesTest.InsertsOnly
scenario.

Change-Id: I3df7da1cc430e4b119c2545addf83e0783023869
Reviewed-on: http://gerrit.cloudera.org:8080/16246
Reviewed-by: Andrew Wong <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
  • Loading branch information
alexeyserbin committed Jul 28, 2020
1 parent 4bee886 commit 5521338
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/kudu/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ GET_TABLE_SCHEMA_DIRECT_CALL=GetTableSchemaTestDirectCall
GET_TABLE_LOCATIONS_RPC=GetTableLocationsTestRpc
GET_TABLE_LOCATIONS_DIRECT_CALL=GetTableLocationsTestDirectCall

SAME_TABLET_CONCURRENT_WRITES=SameTabletConcurrentWrites

LOG_DIR_NAME=build/latest/bench-logs
OUT_DIR_NAME=build/latest/bench-out
HTML_FILE="benchmarks.html"
Expand Down Expand Up @@ -349,6 +351,14 @@ run_benchmarks() {
&> $LOGDIR/${GET_TABLE_LOCATIONS_DIRECT_CALL}_${capacity_mb}_$i.log
done
done

# Run SameTabletConcurrentWritesTest.InsertsOnly with 16 inserter threads.
for i in $(seq 1 $NUM_SAMPLES) ; do
KUDU_ALLOW_SLOW_TESTS=true ./build/latest/bin/same_tablet_concurrent_writes-itest \
--gtest_filter='SameTabletConcurrentWritesTest.InsertsOnly' \
--num_inserter_threads=16 \
&> $LOGDIR/${SAME_TABLET_CONCURRENT_WRITES}$i.log
done
}

parse_and_record_all_results() {
Expand Down Expand Up @@ -568,6 +578,14 @@ parse_and_record_all_results() {
done
done

for i in $(seq 1 $NUM_SAMPLES); do
local log=$LOGDIR/${SAME_TABLET_CONCURRENT_WRITES}$i.log
rate=$(grep -o 'write RPC request rate: .* req/sec' $log | awk '{print $5}')
overflows=$(grep -o 'total count of RPC queue overflows: .*' $log | awk '{print $7}')
record_result $BUILD_IDENTIFIER ${SAME_TABLET_CONCURRENT_WRITES}_req_rate $i $rate
record_result $BUILD_IDENTIFIER ${SAME_TABLET_CONCURRENT_WRITES}_overflows $i $overflows
done

popd
popd
popd
Expand Down Expand Up @@ -658,6 +676,9 @@ load_stats_and_generate_plots() {
load_and_generate_plot "${GET_TABLE_LOCATIONS_RPC}%_req_rate" get-table-locations-rpc
load_and_generate_plot "${GET_TABLE_LOCATIONS_DIRECT_CALL}%_req_rate" get-table-locations-dc

load_and_generate_plot "${SAME_TABLET_CONCURRENT_WRITES}_req_rate" same-tablet-concurrent-writes-rate
load_and_generate_plot "${SAME_TABLET_CONCURRENT_WRITES}_overflows" same-tablet-concurrent-writes-overflows

# Generate all the pngs for all the mt-tablet tests
for i in $(seq 0 $NUM_MT_TABLET_TESTS); do
cat $LOGDIR/${MT_TABLET_TEST}.log | ./graph-metrics.py MultiThreadedTabletTest/$i > $OUTDIR/test$i.tsv
Expand Down

0 comments on commit 5521338

Please sign in to comment.