Skip to content

Commit

Permalink
Add CRDT team-style benchmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeiklejohn committed Jul 17, 2014
1 parent b6b278f commit 9040155
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 0 deletions.
45 changes: 45 additions & 0 deletions perf/crdt_team_map.erl
@@ -0,0 +1,45 @@
-module(crdt_team_map).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").

-define(HARNESS, (rt_config:get(rt_harness))).

confirm() ->
HostList = rt_config:get(rt_hostnames),
Count = length(HostList),
BinSize = rt_config:get(perf_bin_size),

Config = rtperf:standard_config(Count),
lager:info("Generated configuration is: ~p", [Config]),

[Nodes] = rt:build_clusters([Count]),
lager:info("Built cluster: ~p", [Nodes]),

SetSize = rtperf:target_size(rt_config:get(perf_target_pct),
BinSize,
rt_config:get(perf_ram_size),
Count),
[Node | _] = Nodes,
rt:create_and_activate_bucket_type(Node,
<<"maps">>,
[{datatype, map}]),

TestConfig =
rt_bench:config(
max,
rt_config:get(perf_duration),
[{Host, 10017} || Host <- HostList],
{uniform_int, 100},
{uniform_int, 1000},
[{{game, completed}, 10},
{{team, player, addition}, 3},
{{team, player, removal}, 3},
{{team, read}, 100},
{{team, write}, 1}],
{<<"maps">>, <<"testbucket">>},
riakc_pb),

ok = rtperf:maybe_prepop(Nodes, BinSize, SetSize),

ok = rtperf:run_test(Nodes, TestConfig, []),
pass.
15 changes: 15 additions & 0 deletions priv/reporting/report-crdt-team-map.sh
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e

if [ ! -d "$1/" ]; then
echo "a directory must be specified"
exit 1
fi
if [ "x$2" == "xtrue" ]; then
(cd $1; rm -f *-digest; escript ../../priv/reporting/riak-digest.escript)
fi

D1=`basename "$1"`

#generate our comparison graph
gnuplot -e "dir1=\"$1\"; outfilename=\"${D1}-report.png\";" priv/reporting/summarize-crdt-team-map.gpl
116 changes: 116 additions & 0 deletions priv/reporting/summarize-crdt-team-map.gpl
@@ -0,0 +1,116 @@
#clean up the environment for interactive use
unset multiplot
reset

set terminal png font "/Library/Fonts/Arial.ttf" 8 size 1024,768
set output outfilename

#set term x11 size 850, 1100

set multiplot
set grid

#set key below
set tics out

set lmargin 12
set rmargin 10

rd = dir1."/".'rstats-digest'

## graph system stats
set size .5, .315

## graph latencies
set origin 0, .315

#set xtics 10

#set yrange [500:150000]
#set y2range [1000:1100000]
#set y2tics nomirror

set xlabel "5 second intervals"
set ylabel "usec"
unset y2label

plot rd using "node_put_fsm_map_time_95" with lines, \
rd using "node_put_fsm_map_time_99" with lines, \
rd using "node_get_fsm_map_time_95" with lines, \
rd using "node_get_fsm_map_time_99" with lines

unset y2tics
unset y2range

## graph ops performance
set origin 0, .63

#ymax = median(rd) + 1000

#set yrange [0:50000]
set ylabel "operations per node"

plot rd using "vnode_gets" with lines, \
rd using "vnode_puts" with lines

## graph system stats
set origin .48, 0

set xlabel "5 second intervals"
set y2tics nomirror

plot rd using "memory_page_dirty" with lines, \
rd using "memory_page_writeback" with lines axis x1y2

unset y2tics
unset y2range

## graph latencies
set origin .48, .315
#set yrange [500:150000]
#set y2range [1000:1100000]
#set y2tics nomirror

#set xtics 10

set xlabel "5 second intervals"
set ylabel "usec"
unset y2label

plot rd using "node_get_fsm_map_time_median" with lines, \
rd using "node_put_fsm_map_time_median" with lines

unset y2tics
unset y2range

## graph ops performance
set origin .48, .63

#set yrange [0:50000]
set ylabel "operations per node"

#hack to set the title for the whole graph
set label dir1 at screen 0.5,0.97 center front

plot rd using "message_queue_max" with lines, \
rd using "dropped_vnode_requests_total" with lines

set origin 0, 0

#set xtics 60

set yrange [0:100]

set xlabel "5 second intervals"
set ylabel "percentage"

plot rd using "cpu_utilization" with lines, \
rd using "cpu_iowait" with lines, \
rd using "disk_utilization" with lines, \
rd using "memory_utilization" with lines

unset yrange
unset y2tics

unset multiplot
reset

0 comments on commit 9040155

Please sign in to comment.