Example #1
0
/* Write to a buffer the total processed time under the overall
 * object. */
static void
poverall_processed_time (GJSON * json, int sp)
{
  uint64_t elapsed_proc = end_proc - start_proc;

#ifdef TCB_BTREE
  if (conf.store_accumulated_time)
    elapsed_proc = (uint64_t) ht_get_genstats ("accumulated_time");
#endif

  pskeyu64val (json, OVERALL_GENTIME, elapsed_proc, sp, 0);
}
Example #2
0
static void
set_general_stats (void)
{
  verify_formats ();

  logger->valid = logger->processed = logger->invalid = logger->excluded_ip = 0;
#ifdef TCB_BTREE
  logger->excluded_ip = ht_get_genstats ("excluded_ip");
  logger->invalid = ht_get_genstats ("failed_requests");
  logger->processed = ht_get_genstats ("total_requests");
  logger->resp_size = ht_get_genstats ("bandwidth");
  logger->valid = ht_get_genstats ("valid_requests");
  if (logger->resp_size > 0)
    conf.bandwidth = 1;
  if (ht_get_genstats ("serve_usecs"))
    conf.serve_usecs = 1;
#endif
}