Skip to content

Commit

Permalink
Merge remote-tracking branch 'couchbase/cheshire-cat'
Browse files Browse the repository at this point in the history
* couchbase/cheshire-cat:
  MB-43675 Part 0.5 (7.0.1): GSI Audit Service integration feature
  MB-42915: Add 'subdoc.operate' tracing span
  MB-32779: Make "test producer disk backfill limits" single threaded
  BP: MB-42916: Add the response code to slow log

Change-Id: Ib3304cf844835088901fe34371bd584db9c7e6f5
  • Loading branch information
trondn committed Jul 2, 2021
2 parents ab85fdc + b5596af commit 8e6f57f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions daemon/subdocument.cc
Expand Up @@ -32,6 +32,7 @@
#include <memcached/durability_spec.h>
#include <memcached/types.h>
#include <platform/histogram.h>
#include <platform/scope_timer.h>
#include <utilities/engine_errc_2_mcbp.h>
#include <xattr/blob.h>

Expand Down Expand Up @@ -1003,8 +1004,11 @@ static bool subdoc_operate(SubdocCmdContext& context) {
return true;
}

HdrMicroSecBlockTimer bt(
&context.connection.getBucket().subjson_operation_times);
ScopeTimer2<HdrMicroSecStopwatch, cb::tracing::SpanStopwatch> timer(
std::forward_as_tuple(
context.connection.getBucket().subjson_operation_times),
std::forward_as_tuple(context.cookie,
cb::tracing::Code::SubdocOperate));

context.overall_status = cb::mcbp::Status::Success;

Expand Down
2 changes: 2 additions & 0 deletions include/memcached/tracer.h
Expand Up @@ -45,6 +45,8 @@ enum class Code : uint8_t {
SnappyDecompress,
/// Time spent validating if incoming value is JSON.
JsonValidate,
/// Time spent performing subdoc lookup / mutation (all paths).
SubdocOperate,
/// Time spent waiting for a background fetch operation to be scheduled.
BackgroundWait,
/// Time spent performing the actual background load from disk.
Expand Down
2 changes: 2 additions & 0 deletions tracing/tracer.cc
Expand Up @@ -148,6 +148,8 @@ MEMCACHED_PUBLIC_API std::string to_string(const cb::tracing::Code tracecode) {
return "snappy.decompress";
case Code::JsonValidate:
return "json_validate";
case Code::SubdocOperate:
return "subdoc.operate";
case Code::BackgroundWait:
return "bg.wait";
case Code::BackgroundLoad:
Expand Down

0 comments on commit 8e6f57f

Please sign in to comment.