utils/status_profile.c

ソースコードを見る。

関数

BOOL status_profile_dump (BOOL be_verbose)
BOOL status_profile_rates (BOOL be_verbose)
static void profile_separator (const char *title)
static int print_count_samples (const struct profile_stats *const current, const struct profile_stats *const last, SMB_BIG_UINT delta_usec)

変数

static struct profile_stats sample_data [2]
static SMB_BIG_UINT sample_time [2]


関数

BOOL status_profile_dump ( BOOL  be_verbose  ) 

BOOL status_profile_rates ( BOOL  be_verbose  ) 

static void profile_separator ( const char *  title  )  [static]

status_profile.c28 行で定義されています。

参照先 d_printf()linesnprintf().

参照元 status_profile_dump().

00029 {
00030     char line[79 + 1];
00031     char * end;
00032 
00033     snprintf(line, sizeof(line), "**** %s ", title);
00034 
00035     for (end = line + strlen(line); end < &line[sizeof(line) -1]; ++end) {
00036             *end = '*';
00037     }
00038 
00039     line[sizeof(line) - 1] = '\0';
00040     d_printf("%s\n", line);
00041 }

static int print_count_samples ( const struct profile_stats *const   current,
const struct profile_stats *const   last,
SMB_BIG_UINT  delta_usec 
) [static]

status_profile.c426 行で定義されています。

参照先 bufprofile_stats::countnamePR_VALUE_MAXprintf()profile_value_name()snprintf()profile_stats::time.

参照元 status_profile_rates().

00430 {
00431         int i;
00432         int count = 0;
00433         unsigned step;
00434         SMB_BIG_UINT spent;
00435         int delta_sec;
00436         const char * name;
00437         char buf[40];
00438 
00439         if (delta_usec == 0) {
00440                 return 0;
00441         }
00442 
00443         buf[0] = '\0';
00444         delta_sec = usec_to_sec(delta_usec);
00445 
00446         for (i = 0; i < PR_VALUE_MAX; ++i) {
00447                 step = current->count[i] - last->count[i];
00448                 spent = current->time[i] - last->time[i];
00449 
00450                 if (step) {
00451                         ++count;
00452 
00453                         name = profile_value_name(i);
00454 
00455                         if (buf[0] == '\0') {
00456                                 snprintf(buf, sizeof(buf),
00457                                         "%s %d/sec (%.2f%%)",
00458                                         name, step / delta_sec,
00459                                         percent_time(spent, delta_usec));
00460                         } else {
00461                                 printf("%-40s %s %d/sec (%.2f%%)\n",
00462                                         buf, name, step / delta_sec,
00463                                         percent_time(spent, delta_usec));
00464                                 buf[0] = '\0';
00465                         }
00466                 }
00467         }
00468 
00469         return count;
00470 }


変数

struct profile_stats sample_data[2] [static]

status_profile.c472 行で定義されています。

参照元 status_profile_rates().

SMB_BIG_UINT sample_time[2] [static]

status_profile.c473 行で定義されています。

参照元 status_profile_rates().


Sambaに対してSat Aug 29 21:24:37 2009に生成されました。  doxygen 1.4.7