add stats for coverage query starts #467

Merged
merged 3 commits into from Feb 26, 2013

Projects

None yet

2 participants

@evanmcc
Contributor
evanmcc commented Jan 17, 2013
  • index fsm: create, create_error, active
  • keys and bucket fsms (as 'list'): create, create_error, active

This should give us a better picture as to how many index and list queries are being executed against each riak node.

cc @russelldb

@evanmcc evanmcc add stats for coverage query starts
 - index fsm: create, create_error, active
 - keys and bucket fsms (as 'list'): create, create_error, active
0d82a6f
@evanmcc evanmcc commented on an outdated diff Jan 18, 2013
src/riak_kv_stat.erl
@@ -102,12 +104,28 @@ stop() ->
init([]) ->
register_stats(),
- {ok, ok}.
+ State = {state, [spawn(?MODULE, monitor_loop, [index]),
evanmcc
evanmcc Jan 18, 2013 Contributor

should these be spawn_link() instead?

@russelldb russelldb and 1 other commented on an outdated diff Feb 25, 2013
src/riak_kv_stat_bc.erl
@@ -232,7 +232,13 @@ legacy_stat_map() ->
{coord_redirs_total, {riak_kv,node,puts,coord_redirs}, counter},
{executing_mappers, {riak_kv,mapper_count}, counter},
{precommit_fail, {riak_kv, precommit_fail}, counter},
- {postcommit_fail, {riak_kv, postcommit_fail}, counter}
+ {postcommit_fail, {riak_kv, postcommit_fail}, counter},
+ {index_fsm_create, {{riak_kv, index, fsm, create}, one}, spiral},
+ {index_fsm_create_error, {{riak_kv, index, fsm, create}, one}, spiral},
+ {index_fsm_active, {riak_kv, index, fsm, active}, counter},
+ {list_fsm_create, {{riak_kv, list, fsm, create}, one}, spiral},
+ {list_fsm_create_error, {{riak_kv, list, fsm, create}, one}, spiral},
russelldb
russelldb Feb 25, 2013 Contributor

Should be {riak_kv, list, fsm, create, error}

evanmcc
evanmcc Feb 25, 2013 Contributor

oops

@russelldb russelldb commented on an outdated diff Feb 25, 2013
src/riak_kv_stat_bc.erl
@@ -232,7 +232,13 @@ legacy_stat_map() ->
{coord_redirs_total, {riak_kv,node,puts,coord_redirs}, counter},
{executing_mappers, {riak_kv,mapper_count}, counter},
{precommit_fail, {riak_kv, precommit_fail}, counter},
- {postcommit_fail, {riak_kv, postcommit_fail}, counter}
+ {postcommit_fail, {riak_kv, postcommit_fail}, counter},
+ {index_fsm_create, {{riak_kv, index, fsm, create}, one}, spiral},
+ {index_fsm_create_error, {{riak_kv, index, fsm, create}, one}, spiral},
russelldb
russelldb Feb 25, 2013 Contributor

Should be {riak_kv, index, fsm, create, error}

Contributor

Running each of bucket list, key list of index query and then running stats shows incorrect results. The stats output shows that for each [index | list]_fsm_create there is an [index | list]_fsm_create_error. I've highlighted the lines above that are the cause of this (incorrect stat used in error output.) Probably just copypasta.

That aside, it looks good to me, and it works (checking folsom shows correct stats updated.)

Contributor
evanmcc commented Feb 25, 2013

updated.

Contributor

wfm +1 to merge. Many thanks!

@evanmcc evanmcc merged commit 0fe015f into master Feb 26, 2013

1 check passed

default The Travis build passed
Details
@evanmcc evanmcc deleted the pevm-coverage-stats branch Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment