[sheepdog] [PATCH v2 0/5] add graph stat function

Liu Yuan namei.unix at gmail.com
Sat Aug 10 17:30:30 CEST 2013


v2
 - add call nr and time-per-call
 - use float to print time

This patch set add a new command 'graph stat', this is useful to get how much
time each function spends in a top style view.

   Function Name                    | Call NR    | Total time(s)   | Time Per Call(us) 
--------------------------------------------------------------------------------
eventfd_xread                       | 1964       | 110.817993      | 56424.640625    
do_process_work                     | 1155       | 87.415054       | 75684.031250    
do_push_object                      | 220        | 84.434906       | 383795.000000   
push_cache_object                   | 220        | 84.426041       | 383754.718750   
gateway_create_and_write_obj        | 403        | 82.382881       | 204424.015625   
exec_local_req                      | 215        | 82.038292       | 381573.437500   
gateway_forward_request             | 212        | 81.968315       | 386643.000000   
event_loop                          | 5295       | 48.661499       | 9190.084961     
do_event_loop                       | 5295       | 48.650993       | 9188.100586     
xpwrite                             | 1012       | 38.091278       | 37639.601562    
sheep_do_op_work                    | 77         | 36.608986       | 475441.375000   
peer_create_and_write_obj           | 77         | 36.608803       | 475439.000000   
default_create_and_write            | 77         | 36.607231       | 475418.562500   
object_cache_push                   | 10         | 28.783995       | 2878399.500000  
do_background_push                  | 9          | 27.332939       | 3036993.250000  
local_release_vdi                   | 1          | 3.455209        | 3455209.000000  
object_cache_flush_vdi              | 1          | 3.452806        | 3452806.000000  
read_cache_object_noupdate          | 212        | 2.309551        | 10894.107422    
xpread                              | 212        | 2.302798        | 10862.253906    
object_cache_handle_request         | 935        | 1.942179        | 2077.196777     
write_cache_object                  | 934        | 1.885499        | 2018.735229     
write_cache_object_noupdate         | 934        | 1.613303        | 1727.305054     
gateway_write_obj                   | 743        | 1.526443        | 2054.431641     
client_handler                      | 2592       | 0.821204        | 316.822662      

Liu Yuan (5):
  collie: ranme SUBCMD_FLAG_XXX as CMD_XXX
  collie/trace: move trace_cat to graph subcommand
  util: add list_sort()
  collie/trace: add graph stat function
  collie/trace: use macro for the width of thread name

 collie/cluster.c    |   12 ++--
 collie/collie.c     |    4 +-
 collie/collie.h     |    4 +-
 collie/common.c     |    5 +-
 collie/node.c       |   16 ++---
 collie/trace.c      |  173 ++++++++++++++++++++++++++++++++++++++++++++++-----
 collie/vdi.c        |   36 +++++------
 include/list.h      |    3 +
 include/sheep.h     |    4 +-
 lib/util.c          |  137 ++++++++++++++++++++++++++++++++++++++++
 sheep/trace/graph.c |    1 +
 11 files changed, 337 insertions(+), 58 deletions(-)

-- 
1.7.9.5



More information about the sheepdog mailing list