[PATCH] More stats

2 views
Skip to first unread message

Nick Brachet

unread,
Aug 25, 2008, 2:16:06 PM8/25/08
to memc...@googlegroups.com
Hi all, The attached patch (against subversion rev793, 1.2.6-ish) adds 4 stats: cmd_incr, cmd_decr, cmd_delete, and cmd_flush. They should be pretty self explanatory.

With this patch the output of the 'stats' command looks like: stats STAT pid 31709 STAT uptime 140 STAT time 1219679445 STAT version 1.2.6a STAT pointer_size 32 STAT rusage_user 0.002870 STAT rusage_system 0.006022 STAT curr_items 1 STAT total_items 2 STAT bytes 57 STAT curr_connections 6 STAT total_connections 7 STAT connection_structures 7 STAT cmd_get 1 STAT cmd_set 2 STAT cmd_incr 1 STAT cmd_decr 1 STAT cmd_delete 1 STAT cmd_flush 1 STAT get_hits 1 STAT get_misses 0 STAT evictions 0 STAT bytes_read 303 STAT bytes_written 3662 STAT limit_maxbytes 67108864 END While the output of the 'stats detail dump' command looks like: stats detail dump PREFIX abcd get 1 hit 1 set 2 incr 1 decr 1 del 1 END

Enjoy!
stats.patch

nick

unread,
Aug 25, 2008, 2:42:30 PM8/25/08
to memcached
Argh. Let me try to put the formatting back in.

dormando

unread,
Aug 31, 2008, 9:36:35 PM8/31/08
to memcached
Yo,

thanks for the patch!

This does increase the contention on the stats mutex a little. Does anyone
mind terribly? Has someone profiled this mutex recently? (trond?)

I'd need to clean up the patch and separate out the commit a bit, but
otherwise it looks okay.

One option is to just add a few more mutexes used in stats to spread the
load a touch. Easy to do now, then we can ignore the problem for a while
longer.

-Dormando

Reply all
Reply to author
Forward
0 new messages