Changeset 85e32ea88e1d7ad88a960783bb3033f7c1844de3

Show
Ignore:
Timestamp:
04/09/12 14:45:52 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1333982752 +0000
git-parent:

[4f9658b6d44898802c561f25d3a3638767b4f3f0]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1333982752 +0000
Message:

meta information on the timing slot allocations via console

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    rd5db0b8 r85e32ea  
    9494                      check_slots_seconds_count[60] = { 0 }; 
    9595 
     96void 
     97debug_print_slots(noit_console_closure_t ncct) { 
     98} 
     99static int 
     100noit_console_show_timing_slots(noit_console_closure_t ncct, 
     101                               int argc, char **argv, 
     102                               noit_console_state_t *dstate, 
     103                               void *closure) { 
     104  int i, j; 
     105  const int upl = (60000 / SCHEDULE_GRANULARITY) / 60; 
     106  for(i=0;i<60;i++) { 
     107    nc_printf(ncct, "[%02d] %04d: ", i, check_slots_seconds_count[i]); 
     108    for(j=i*upl;j<(i+1)*upl;j++) { 
     109      char cp = '!'; 
     110      if(check_slots_count[j] < 10) cp = '0' + check_slots_count[j]; 
     111      else if(check_slots_count[j] < 36) cp = 'a' + (check_slots_count[j] - 10); 
     112      nc_printf(ncct, "%c", cp); 
     113    } 
     114    nc_printf(ncct, "\n"); 
     115  } 
     116  return 0; 
     117} 
     118 
    96119u_int64_t noit_check_completion_count() { 
    97120  return check_completion_count; 
     
    15531576 
    15541577  noit_console_state_add_cmd(showcmd->dstate, 
     1578    NCSCMD("timing_slots", noit_console_show_timing_slots, NULL, NULL, NULL)); 
     1579 
     1580  noit_console_state_add_cmd(showcmd->dstate, 
    15551581    NCSCMD("checks", noit_console_show_checks, NULL, NULL, NULL)); 
    15561582