Changeset 645
- Timestamp:
- 11/19/07 00:15:18 (1 year ago)
- Files:
-
- trunk/server/memcached.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/server/memcached.c
r643 r645 1103 1103 token_t *key_token = &tokens[KEY_TOKEN]; 1104 1104 char suffix[255]; 1105 int stats_get_cmds = 0; 1106 int stats_get_hits = 0; 1107 int stats_get_misses = 0; 1105 1108 assert(c != NULL); 1106 1109 … … 1125 1128 1126 1129 if(nkey > KEY_MAX_LENGTH) { 1130 STATS_LOCK(); 1131 stats.get_cmds += stats_get_cmds; 1132 stats.get_hits += stats_get_hits; 1133 stats.get_misses += stats_get_misses; 1134 STATS_UNLOCK(); 1127 1135 out_string(c, "CLIENT_ERROR bad command line format"); 1128 1136 return; 1129 1137 } 1130 1138 1131 STATS_LOCK(); 1132 stats.get_cmds++; 1133 STATS_UNLOCK(); 1139 stats_get_cmds++; 1134 1140 it = item_get(key, nkey); 1135 1141 if (settings.detail_enabled) { … … 1180 1186 1181 1187 /* item_get() has incremented it->refcount for us */ 1182 STATS_LOCK(); 1183 stats.get_hits++; 1184 STATS_UNLOCK(); 1188 stats_get_hits++; 1185 1189 item_update(it); 1186 1190 *(c->ilist + i) = it; … … 1188 1192 1189 1193 } else { 1190 STATS_LOCK(); 1191 stats.get_misses++; 1192 STATS_UNLOCK(); 1194 stats_get_misses++; 1193 1195 } 1194 1196 … … 1226 1228 c->msgcurr = 0; 1227 1229 } 1230 1231 STATS_LOCK(); 1232 stats.get_cmds += stats_get_cmds; 1233 stats.get_hits += stats_get_hits; 1234 stats.get_misses += stats_get_misses; 1235 STATS_UNLOCK(); 1236 1228 1237 return; 1229 1238 }
