Permalink
Browse files

More precise compaction time calculation

When measuring the duration of view compaction, account for
the initial step of coordinating with the updater if the
updater is running in parallel. Normally this is very fast,
but for some edge cases it can take a significant amount of
time, as it did in MB-7280 (Windows environment).

Change-Id: I666c0d418c6eeda14fee92a89dc2b599b1b48355
Reviewed-on: http://review.couchbase.org/24255
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
  • Loading branch information...
1 parent a5e20cf commit f101aa10aa0c11ea28e46ba8c51ce0d2e899954b @fdmanana fdmanana committed Jan 29, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/couch_set_view/src/couch_set_view_compactor.erl
@@ -81,6 +81,7 @@ compact_group(Group0, EmptyGroup, TmpDir, UpdaterPid, Owner, UserStatus) ->
set_name = SetName,
type = Type
} = Group0,
+ StartTime = os:timestamp(),
case is_pid(UpdaterPid) of
true ->
@@ -110,7 +111,6 @@ compact_group(Group0, EmptyGroup, TmpDir, UpdaterPid, Owner, UserStatus) ->
index_header = Header,
sig = GroupSig
} = Group,
- StartTime = os:timestamp(),
#set_view_group{
id_btree = EmptyIdBtree,

0 comments on commit f101aa1

Please sign in to comment.