mctimings

mctimings

The mctimings tool displays end-to-end timing information for all operations.

Syntax

The basic syntax is:

mctimings [options] [opcode / stat_name]*			

Description

The mctimings tool displays timing information for all operations from when the request was first received to when the response was sent out. This timing differs from cbstats timings, which only measures the time spent on a request by a front-end worker thread and does not include any time spent fetching items from disk. As such, mctimings provides a more accurate and representative view of operation timings.

The tool is found in the following locations:

Platform Location
Linux /opt/couchbase/bin/mctimings
Windows C:\Program Files\Couchbase\Server\bin\mctimings.exe
Mac OS X /Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/mctimings

Options

mctimings can be run with no arguments, in which case it returns timing information for all operations. You can also pass one or more operations, in which case it only displays timing information for the specified operations.

The following are a few common CRUD operations and their opcodes, a more comprehensive list can be found in the memcached binary protocol reference:

Operation Opcode
GET 0x00
SET 0x01
ADD 0x02
REPLACE 0x03
DELETE 0x04
INCREMENT 0x05
DECREMENT 0x06

The following are the command options:

Options Description
-h [host] Hostname of the node to connect to. It can optionally include the port too (as host:port), which should be the memcached port, by default 11210.
-b [bucket_name] The bucket to get timings from. Default: default. This option only works if authenticating as the memcached admin user which is internal only and not the same as the cluster-level administrator.
-p [port] The port to connect to, this should be the memcached port, by default 11210. If using a secure connection (the -s flag) then this should be 11211.
-u [username] User name used to authenticate. This is the name of the bucket which you want to retrieve timings from.
-P [password] Password used to authenticate. This is the bucket password if it is protected by a SASL auth password, otherwise it can be omitted.
-s Use a secure connection to retrieve timing statistics.
-v Show operation timings as histograms. If not enabled, then only the total number of operations are displayed.

Examples

Getting timings for all operations

To get timing histograms for all operations on host 192.0.2.0 for the bucket travel-sample:

mctimings -h localhost:11210 -u travel-sample -v

Response:

The following data is collected for "GET"
[   0 -    9]us ( 23.52%)  119 | ################
[  10 -   19]us ( 86.76%)  320 | ############################################
[  20 -   29]us ( 97.43%)   54 | #######
[  30 -   39]us ( 98.22%)    4 | 
[  40 -   49]us ( 99.01%)    4 | 
[  50 -   59]us ( 99.60%)    3 | 
[  60 -   69]us ( 99.80%)    1 | 
[ 280 -  289]us (100.00%)    1 | 
Total: 506 operations
The following data is collected for "STAT"
[   0 -    9]us (  0.04%)     8 | 
[  10 -   19]us ( 21.94%)  4744 | ############################################
[  20 -   29]us ( 23.31%)   296 | ##
[  30 -   39]us ( 23.44%)    29 | 
[  40 -   49]us ( 23.79%)    76 | 
[  50 -   59]us ( 24.35%)   122 | #
[  60 -   69]us ( 25.22%)   187 | #
[  70 -   79]us ( 28.54%)   719 | ######
[  80 -   89]us ( 33.98%)  1178 | ##########
[  90 -   99]us ( 40.15%)  1337 | ############
[ 100 -  109]us ( 43.24%)   670 | ######
[ 110 -  119]us ( 43.98%)   159 | #
[ 120 -  129]us ( 44.49%)   111 | #
[ 130 -  139]us ( 44.79%)    66 | 
[ 140 -  149]us ( 45.10%)    67 | 
[ 150 -  159]us ( 45.41%)    66 | 
[ 160 -  169]us ( 45.74%)    73 | 
[ 170 -  179]us ( 46.03%)    62 | 
[ 180 -  189]us ( 46.31%)    60 | 
[ 190 -  199]us ( 46.57%)    58 | 
[ 200 -  209]us ( 46.80%)    49 | 
[ 210 -  219]us ( 47.04%)    51 | 
[ 220 -  229]us ( 47.19%)    34 | 
[ 230 -  239]us ( 47.39%)    42 | 
[ 240 -  249]us ( 47.54%)    33 | 
[ 250 -  259]us ( 47.62%)    18 | 
[ 260 -  269]us ( 47.67%)    11 | 
[ 270 -  279]us ( 47.73%)    12 | 
[ 280 -  289]us ( 47.78%)    11 | 
[ 290 -  299]us ( 47.83%)    10 | 
[ 300 -  309]us ( 47.85%)     6 | 
[ 310 -  319]us ( 47.90%)    10 | 
[ 320 -  329]us ( 47.93%)     6 | 
[ 330 -  339]us ( 47.95%)     5 | 
[ 340 -  349]us ( 47.96%)     3 | 
[ 350 -  359]us ( 48.00%)     7 | 
[ 360 -  369]us ( 48.02%)     5 | 
[ 370 -  379]us ( 48.04%)     5 | 
[ 380 -  389]us ( 48.06%)     4 | 
[ 390 -  399]us ( 48.08%)     4 | 
[ 400 -  409]us ( 48.11%)     6 | 
[ 410 -  419]us ( 48.29%)    40 | 
[ 420 -  429]us ( 49.89%)   346 | ###
[ 430 -  439]us ( 50.62%)   159 | #
[ 440 -  449]us ( 52.62%)   432 | ####
[ 450 -  459]us ( 53.53%)   198 | #
[ 460 -  469]us ( 55.10%)   340 | ###
[ 470 -  479]us ( 57.36%)   489 | ####
[ 480 -  489]us ( 58.39%)   224 | ##
[ 490 -  499]us ( 60.42%)   439 | ####
[ 500 -  509]us ( 61.22%)   174 | #
[ 510 -  519]us ( 62.16%)   203 | #
[ 520 -  529]us ( 62.83%)   145 | #
[ 530 -  539]us ( 63.42%)   127 | #
[ 540 -  549]us ( 63.95%)   115 | #
[ 550 -  559]us ( 64.51%)   121 | #
[ 560 -  569]us ( 65.05%)   117 | #
[ 570 -  579]us ( 65.58%)   116 | #
[ 580 -  589]us ( 66.48%)   194 | #
[ 590 -  599]us ( 67.20%)   156 | #
[ 600 -  609]us ( 68.01%)   176 | #
[ 610 -  619]us ( 69.03%)   220 | ##
[ 620 -  629]us ( 69.96%)   202 | #
[ 630 -  639]us ( 70.75%)   172 | #
[ 640 -  649]us ( 71.32%)   123 | #
[ 650 -  659]us ( 71.92%)   130 | #
[ 660 -  669]us ( 72.42%)   109 | #
[ 670 -  679]us ( 72.85%)    93 | 
[ 680 -  689]us ( 73.80%)   206 | #
[ 690 -  699]us ( 74.65%)   183 | #
[ 700 -  709]us ( 76.14%)   323 | ##
[ 710 -  719]us ( 77.56%)   308 | ##
[ 720 -  729]us ( 78.24%)   147 | #
[ 730 -  739]us ( 78.58%)    74 | 
[ 740 -  749]us ( 78.92%)    73 | 
[ 750 -  759]us ( 79.76%)   183 | #
[ 760 -  769]us ( 80.51%)   161 | #
[ 770 -  779]us ( 81.68%)   253 | ##
[ 780 -  789]us ( 83.58%)   412 | ###
[ 790 -  799]us ( 84.66%)   235 | ##
[ 800 -  809]us ( 85.34%)   146 | #
[ 810 -  819]us ( 85.87%)   116 | #
[ 820 -  829]us ( 86.39%)   111 | #
[ 830 -  839]us ( 86.87%)   106 | 
[ 840 -  849]us ( 87.35%)   103 | 
[ 850 -  859]us ( 87.92%)   123 | #
[ 860 -  869]us ( 88.48%)   122 | #
[ 870 -  879]us ( 89.01%)   115 | #
[ 880 -  889]us ( 89.47%)   100 | 
[ 890 -  899]us ( 89.84%)    79 | 
[ 900 -  909]us ( 90.12%)    62 | 
[ 910 -  919]us ( 90.35%)    48 | 
[ 920 -  929]us ( 90.63%)    61 | 
[ 930 -  939]us ( 90.89%)    56 | 
[ 940 -  949]us ( 91.10%)    47 | 
[ 950 -  959]us ( 91.33%)    50 | 
[ 960 -  969]us ( 91.53%)    43 | 
[ 970 -  979]us ( 91.70%)    37 | 
[ 980 -  989]us ( 91.87%)    37 | 
[ 990 -  999]us ( 92.01%)    29 | 
[   1 -    1]ms ( 96.47%)   966 | ########
[   2 -    2]ms ( 99.21%)   593 | #####
[   3 -    3]ms ( 99.46%)    56 | 
[   4 -    4]ms ( 99.54%)    16 | 
[   5 -    5]ms ( 99.56%)     5 | 
[   6 -    6]ms ( 99.57%)     1 | 
[   7 -    7]ms ( 99.62%)    11 | 
[   8 -    8]ms ( 99.78%)    36 | 
[   9 -    9]ms ( 99.88%)    22 | 
[  10 -   10]ms ( 99.93%)     9 | 
[  11 -   11]ms ( 99.94%)     3 | 
[  12 -   12]ms ( 99.95%)     2 | 
[  13 -   13]ms ( 99.95%)     1 | 
[  14 -   14]ms ( 99.96%)     2 | 
[  17 -   17]ms ( 99.97%)     1 | 
[  18 -   18]ms ( 99.97%)     1 | 
[  21 -   21]ms ( 99.98%)     1 | 
[  23 -   23]ms ( 99.98%)     1 | 
[  25 -   25]ms ( 99.99%)     1 | 
[  26 -   26]ms ( 99.99%)     1 | 
[  45 -   45]ms (100.00%)     1 | 
[  50 -  499]ms (100.00%)     1 | 
Total: 21660 operations
The following data is collected for "HELLO"
[   0 -    9]us ( 96.69%)  350 | ############################################
[  10 -   19]us ( 99.17%)    9 | #
[  20 -   29]us ( 99.72%)    2 | 
[  40 -   49]us (100.00%)    1 | 
Total: 362 operations
The following data is collected for "SASL_STEP"
[  60 -   69]us ( 16.80%)   63 | #################
[  70 -   79]us ( 58.40%)  156 | ############################################
[  80 -   89]us ( 77.33%)   71 | ####################
[  90 -   99]us ( 86.67%)   35 | #########
[ 100 -  109]us ( 89.87%)   12 | ###
[ 110 -  119]us ( 91.73%)    7 | #
[ 120 -  129]us ( 93.33%)    6 | #
[ 130 -  139]us ( 94.40%)    4 | #
[ 160 -  169]us ( 95.20%)    3 | 
[ 170 -  179]us ( 96.00%)    3 | 
[ 180 -  189]us ( 96.27%)    1 | 
[ 190 -  199]us ( 96.80%)    2 | 
[ 200 -  209]us ( 97.07%)    1 | 
[ 210 -  219]us ( 97.33%)    1 | 
[ 220 -  229]us ( 97.60%)    1 | 
[ 250 -  259]us ( 97.87%)    1 | 
[ 260 -  269]us ( 98.40%)    2 | 
[ 330 -  339]us ( 98.67%)    1 | 
[ 340 -  349]us ( 98.93%)    1 | 
[ 350 -  359]us ( 99.20%)    1 | 
[ 400 -  409]us ( 99.47%)    1 | 
[ 510 -  519]us ( 99.73%)    1 | 
[   2 -    2]ms (100.00%)    1 | 
Total: 375 operations
The following data is collected for "DCP_OPEN"
[  20 -   29]us (  5.56%)   1 | ###
[  30 -   39]us ( 72.22%)  12 | ############################################
[  40 -   49]us ( 83.33%)   2 | #######
[  50 -   59]us ( 94.44%)   2 | #######
[ 200 -  209]us (100.00%)   1 | ###
Total: 18 operations
The following data is collected for "DCP_STREAM_REQ"
[  30 -   39]us (  0.10%)    1 | 
[  40 -   49]us (  7.91%)   80 | #############
[  50 -   59]us ( 19.43%)  118 | ####################
[  60 -   69]us ( 29.59%)  104 | ##################
[  70 -   79]us ( 35.25%)   58 | ##########
[  80 -   89]us ( 40.33%)   52 | #########
[  90 -   99]us ( 45.21%)   50 | ########
[ 100 -  109]us ( 65.92%)  212 | ####################################
[ 110 -  119]us ( 90.62%)  253 | ############################################
[ 120 -  129]us ( 93.36%)   28 | ####
[ 130 -  139]us ( 94.82%)   15 | ##
[ 140 -  149]us ( 95.31%)    5 | 
[ 150 -  159]us ( 95.61%)    3 | 
[ 160 -  169]us ( 95.90%)    3 | 
[ 170 -  179]us ( 96.58%)    7 | #
[ 180 -  189]us ( 97.17%)    6 | #
[ 190 -  199]us ( 97.56%)    4 | 
[ 200 -  209]us ( 97.75%)    2 | 
[ 210 -  219]us ( 98.14%)    4 | 
[ 220 -  229]us ( 98.44%)    3 | 
[ 240 -  249]us ( 98.54%)    1 | 
[ 250 -  259]us ( 98.93%)    4 | 
[ 260 -  269]us ( 99.12%)    2 | 
[ 270 -  279]us ( 99.32%)    2 | 
[ 280 -  289]us ( 99.41%)    1 | 
[ 290 -  299]us ( 99.61%)    2 | 
[ 300 -  309]us ( 99.71%)    1 | 
[ 370 -  379]us ( 99.80%)    1 | 
[ 420 -  429]us ( 99.90%)    1 | 
[ 610 -  619]us (100.00%)    1 | 
Total: 1024 operations
The following data is collected for "DCP_GET_FAILOVER_LOG"
[   0 -    9]us ( 98.83%)  1014 | ############################################
[  10 -   19]us ( 99.12%)     3 | 
[  30 -   39]us ( 99.32%)     2 | 
[  50 -   59]us ( 99.61%)     3 | 
[  60 -   69]us ( 99.81%)     2 | 
[ 120 -  129]us ( 99.90%)     1 | 
[ 180 -  189]us (100.00%)     1 | 
Total: 1026 operations
The following data is collected for "DCP_CONTROL"
[   0 -    9]us ( 94.12%)  16 | ############################################
[  10 -   19]us (100.00%)   1 | ##
Total: 17 operations
The following data is collected for "SELECT_BUCKET"
[   0 -    9]us ( 98.59%)  488 | ############################################
[  10 -   19]us ( 98.99%)    2 | 
[  20 -   29]us ( 99.39%)    2 | 
[  40 -   49]us ( 99.60%)    1 | 
[  50 -   59]us ( 99.80%)    1 | 
[  70 -   79]us (100.00%)    1 | 
Total: 495 operations
The following data is collected for "ENABLE_TRAFFIC"
[  20 -   29]us (100.00%)  1 | ############################################
Total: 1 operations
The following data is collected for "SET_CLUSTER_CONFIG"
[ 450 -  459]us (100.00%)  1 | ############################################
Total: 1 operations
The following data is collected for "GET_CLUSTER_CONFIG"
[   0 -    9]us ( 93.09%)  337 | ############################################
[  10 -   19]us ( 98.34%)   19 | ##
[  20 -   29]us ( 98.90%)    2 | 
[  30 -   39]us ( 99.45%)    2 | 
[  80 -   89]us ( 99.72%)    1 | 
[ 230 -  239]us (100.00%)    1 | 
Total: 362 operations
The following data is collected for "GET_KEYS"
[  50 -   59]us (  3.00%)   738 | #######
[  60 -   69]us ( 18.84%)  3892 | #######################################
[  70 -   79]us ( 27.32%)  2084 | ####################
[  80 -   89]us ( 30.55%)   794 | #######
[  90 -   99]us ( 32.13%)   388 | ###
[ 100 -  109]us ( 43.59%)  2816 | ############################
[ 110 -  119]us ( 61.39%)  4376 | ############################################
[ 120 -  129]us ( 71.14%)  2396 | ########################
[ 130 -  139]us ( 77.49%)  1561 | ###############
[ 140 -  149]us ( 82.06%)  1121 | ###########
[ 150 -  159]us ( 84.73%)   658 | ######
[ 160 -  169]us ( 87.01%)   560 | #####
[ 170 -  179]us ( 88.40%)   341 | ###
[ 180 -  189]us ( 89.60%)   294 | ##
[ 190 -  199]us ( 90.61%)   249 | ##
[ 200 -  209]us ( 91.49%)   216 | ##
[ 210 -  219]us ( 92.26%)   190 | #
[ 220 -  229]us ( 92.81%)   134 | #
[ 230 -  239]us ( 93.33%)   129 | #
[ 240 -  249]us ( 93.82%)   121 | #
[ 250 -  259]us ( 94.24%)   102 | #
[ 260 -  269]us ( 94.50%)    65 | 
[ 270 -  279]us ( 94.83%)    81 | 
[ 280 -  289]us ( 95.15%)    79 | 
[ 290 -  299]us ( 95.39%)    59 | 
[ 300 -  309]us ( 95.63%)    58 | 
[ 310 -  319]us ( 95.83%)    48 | 
[ 320 -  329]us ( 96.03%)    51 | 
[ 330 -  339]us ( 96.20%)    41 | 
[ 340 -  349]us ( 96.38%)    44 | 
[ 350 -  359]us ( 96.52%)    34 | 
[ 360 -  369]us ( 96.61%)    23 | 
[ 370 -  379]us ( 96.75%)    34 | 
[ 380 -  389]us ( 96.90%)    37 | 
[ 390 -  399]us ( 97.02%)    29 | 
[ 400 -  409]us ( 97.12%)    26 | 
[ 410 -  419]us ( 97.23%)    26 | 
[ 420 -  429]us ( 97.32%)    22 | 
[ 430 -  439]us ( 97.40%)    20 | 
[ 440 -  449]us ( 97.48%)    19 | 
[ 450 -  459]us ( 97.58%)    26 | 
[ 460 -  469]us ( 97.67%)    21 | 
[ 470 -  479]us ( 97.71%)    11 | 
[ 480 -  489]us ( 97.77%)    15 | 
[ 490 -  499]us ( 97.82%)    11 | 
[ 500 -  509]us ( 97.87%)    13 | 
[ 510 -  519]us ( 97.94%)    16 | 
[ 520 -  529]us ( 97.99%)    14 | 
[ 530 -  539]us ( 98.06%)    15 | 
[ 540 -  549]us ( 98.10%)    11 | 
[ 550 -  559]us ( 98.14%)     9 | 
[ 560 -  569]us ( 98.20%)    15 | 
[ 570 -  579]us ( 98.21%)     3 | 
[ 580 -  589]us ( 98.25%)     9 | 
[ 590 -  599]us ( 98.27%)     5 | 
[ 600 -  609]us ( 98.30%)     7 | 
[ 610 -  619]us ( 98.32%)     7 | 
[ 620 -  629]us ( 98.37%)    11 | 
[ 630 -  639]us ( 98.40%)     7 | 
[ 640 -  649]us ( 98.42%)     5 | 
[ 650 -  659]us ( 98.45%)     7 | 
[ 660 -  669]us ( 98.47%)     5 | 
[ 670 -  679]us ( 98.47%)     2 | 
[ 680 -  689]us ( 98.52%)    11 | 
[ 690 -  699]us ( 98.55%)     7 | 
[ 700 -  709]us ( 98.59%)    11 | 
[ 710 -  719]us ( 98.61%)     4 | 
[ 720 -  729]us ( 98.62%)     3 | 
[ 730 -  739]us ( 98.65%)     6 | 
[ 740 -  749]us ( 98.68%)     8 | 
[ 750 -  759]us ( 98.69%)     4 | 
[ 760 -  769]us ( 98.71%)     5 | 
[ 770 -  779]us ( 98.74%)     6 | 
[ 780 -  789]us ( 98.74%)     1 | 
[ 790 -  799]us ( 98.75%)     3 | 
[ 800 -  809]us ( 98.78%)     5 | 
[ 810 -  819]us ( 98.80%)     7 | 
[ 820 -  829]us ( 98.81%)     1 | 
[ 830 -  839]us ( 98.83%)     5 | 
[ 840 -  849]us ( 98.84%)     3 | 
[ 850 -  859]us ( 98.84%)     1 | 
[ 860 -  869]us ( 98.85%)     2 | 
[ 880 -  889]us ( 98.87%)     5 | 
[ 890 -  899]us ( 98.88%)     2 | 
[ 900 -  909]us ( 98.90%)     5 | 
[ 910 -  919]us ( 98.91%)     3 | 
[ 920 -  929]us ( 98.93%)     3 | 
[ 940 -  949]us ( 98.94%)     3 | 
[ 950 -  959]us ( 98.95%)     2 | 
[ 960 -  969]us ( 98.96%)     3 | 
[ 970 -  979]us ( 98.97%)     4 | 
[ 980 -  989]us ( 98.99%)     3 | 
[ 990 -  999]us ( 99.01%)     6 | 
[   1 -    1]ms ( 99.57%)   138 | #
[   2 -    2]ms ( 99.74%)    42 | 
[   3 -    3]ms ( 99.82%)    18 | 
[   4 -    4]ms ( 99.89%)    17 | 
[   5 -    5]ms ( 99.92%)     8 | 
[   6 -    6]ms ( 99.94%)     6 | 
[   7 -    7]ms ( 99.96%)     3 | 
[   8 -    8]ms ( 99.96%)     1 | 
[   9 -    9]ms ( 99.96%)     1 | 
[  11 -   11]ms ( 99.97%)     1 | 
[  12 -   12]ms ( 99.98%)     2 | 
[  13 -   13]ms ( 99.98%)     1 | 
[  18 -   18]ms ( 99.98%)     1 | 
[  27 -   27]ms ( 99.99%)     1 | 
[  28 -   28]ms ( 99.99%)     1 | 
[  41 -   41]ms (100.00%)     1 | 
[  50 -  499]ms (100.00%)     1 | 
Total: 24576 operations
The following data is collected for "GET_CMD_TIMER"
[  50 -   59]us ( 53.16%)  1491 | ############################################
[  60 -   69]us ( 81.85%)   805 | #######################
[  70 -   79]us ( 88.06%)   174 | #####
[  80 -   89]us ( 90.66%)    73 | ##
[  90 -   99]us ( 92.69%)    57 | #
[ 100 -  109]us ( 94.55%)    52 | #
[ 110 -  119]us ( 95.44%)    25 | 
[ 120 -  129]us ( 96.08%)    18 | 
[ 130 -  139]us ( 96.47%)    11 | 
[ 140 -  149]us ( 97.04%)    16 | 
[ 150 -  159]us ( 97.22%)     5 | 
[ 160 -  169]us ( 97.43%)     6 | 
[ 170 -  179]us ( 97.83%)    11 | 
[ 180 -  189]us ( 98.07%)     7 | 
[ 190 -  199]us ( 98.22%)     4 | 
[ 200 -  209]us ( 98.40%)     5 | 
[ 210 -  219]us ( 98.43%)     1 | 
[ 220 -  229]us ( 98.57%)     4 | 
[ 230 -  239]us ( 98.65%)     2 | 
[ 240 -  249]us ( 98.68%)     1 | 
[ 250 -  259]us ( 98.72%)     1 | 
[ 260 -  269]us ( 98.82%)     3 | 
[ 270 -  279]us ( 98.89%)     2 | 
[ 280 -  289]us ( 98.93%)     1 | 
[ 290 -  299]us ( 98.97%)     1 | 
[ 300 -  309]us ( 99.04%)     2 | 
[ 320 -  329]us ( 99.07%)     1 | 
[ 350 -  359]us ( 99.14%)     2 | 
[ 360 -  369]us ( 99.22%)     2 | 
[ 390 -  399]us ( 99.25%)     1 | 
[ 400 -  409]us ( 99.32%)     2 | 
[ 430 -  439]us ( 99.36%)     1 | 
[ 450 -  459]us ( 99.39%)     1 | 
[ 500 -  509]us ( 99.43%)     1 | 
[ 510 -  519]us ( 99.50%)     2 | 
[ 630 -  639]us ( 99.54%)     1 | 
[ 640 -  649]us ( 99.57%)     1 | 
[ 750 -  759]us ( 99.61%)     1 | 
[ 800 -  809]us ( 99.68%)     2 | 
[ 860 -  869]us ( 99.71%)     1 | 
[ 870 -  879]us ( 99.75%)     1 | 
[   1 -    1]ms ( 99.93%)     5 | 
[  32 -   32]ms ( 99.96%)     1 | 
[  39 -   39]ms (100.00%)     1 | 
Total: 2805 operations
The following data is collected for "SET"
[  40 -   49]us (  1.67%)   1 | #
[  50 -   59]us ( 56.67%)  33 | ############################################
[  60 -   69]us ( 88.33%)  19 | #########################
[  70 -   79]us ( 91.67%)   2 | ##
[  80 -   89]us ( 95.00%)   2 | ##
[ 160 -  169]us ( 96.67%)   1 | #
[ 220 -  229]us ( 98.33%)   1 | #
[ 300 -  309]us (100.00%)   1 | #
Total: 60 operations

Getting timings for a single operation

You can use mctimings to retrieve timing histograms for a single operation rather than all operations. This is useful as many operations are not client-facing.

To get timing histograms for just GET operations in the bucket travel-sample on node 192.0.2.0 by specifying the operation name:

mctimings -h 192.0.2.0:11210 -u travel-sample -v GET

The same can also be achieved by specifying the hexadecimal opcode of the operation:

mctimings -h 192.0.2.0:11210 -u travel-sample -v 0x00

Response:

The following data is collected for "GET"
[   0 -    9]us ( 23.52%)  119 | ################
[  10 -   19]us ( 86.76%)  320 | ############################################
[  20 -   29]us ( 97.43%)   54 | #######
[  30 -   39]us ( 98.22%)    4 | 
[  40 -   49]us ( 99.01%)    4 | 
[  50 -   59]us ( 99.60%)    3 | 
[  60 -   69]us ( 99.80%)    1 | 
[ 280 -  289]us (100.00%)    1 | 
Total: 506 operations

Getting timings for multiple operations

You can use mctimings to retrieve timing histograms for multiple specific operations rather than all operations at once (or a series of single operations).

An example of getting the timings of GETs and SETs from the bucket travel-sample on node 192.0.2.0:

mctimings -h 192.0.2.0:11210 -u travel-sample -v GET SET      

Response:

The following data is collected for "GET"
[   0 -    9]us ( 23.52%)  119 | ################
[  10 -   19]us ( 86.76%)  320 | ############################################
[  20 -   29]us ( 97.43%)   54 | #######
[  30 -   39]us ( 98.22%)    4 | 
[  40 -   49]us ( 99.01%)    4 | 
[  50 -   59]us ( 99.60%)    3 | 
[  60 -   69]us ( 99.80%)    1 | 
[ 280 -  289]us (100.00%)    1 | 
Total: 506 operations
The following data is collected for "SET"
[  40 -   49]us (  1.67%)   1 | #
[  50 -   59]us ( 56.67%)  33 | ############################################
[  60 -   69]us ( 88.33%)  19 | #########################
[  70 -   79]us ( 91.67%)   2 | ##
[  80 -   89]us ( 95.00%)   2 | ##
[ 160 -  169]us ( 96.67%)   1 | #
[ 220 -  229]us ( 98.33%)   1 | #
[ 300 -  309]us (100.00%)   1 | #
Total: 60 operations