Skip to content

Instantly share code, notes, and snippets.

@hirose31
Created September 18, 2008 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hirose31/11395 to your computer and use it in GitHub Desktop.
Save hirose31/11395 to your computer and use it in GitHub Desktop.
commit 108d2ecb404e07e24f889cbc65ccb7c1a2b54a3a
Author: HIROSE Masaaki <hirose@sag14.klab.org>
Date: Thu Sep 18 16:15:28 2008 +0900
to count get_cmds
diff --git a/memcached.c b/memcached.c
index 6f81210..b1f858f 100644
--- a/memcached.c
+++ b/memcached.c
@@ -1138,6 +1138,9 @@ static void process_bin_get(conn *c) {
fprintf(stderr, "\n");
}
+ STATS_LOCK();
+ stats.get_cmds++;
+ STATS_UNLOCK();
it = item_get(key, nkey);
if (it) {
/* the length has two unnecessary bytes ("\r\n") */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment