Lines Matching defs:stats
176 stats_t stats;
269 print_statistics(const config_t *config, const times_t *times, stats_t *stats)
284 units, stats->num_sent);
286 units, stats->num_completed,
287 SAFE_DIV(100.0 * stats->num_completed, stats->num_sent));
289 units, stats->num_timedout,
290 SAFE_DIV(100.0 * stats->num_timedout, stats->num_sent));
291 if (stats->num_interrupted > 0)
294 units, stats->num_interrupted,
295 SAFE_DIV(100.0 * stats->num_interrupted,
296 stats->num_sent));
302 if (stats->rcodecounts[i] == 0)
309 perf_dns_rcode_strings[i], stats->rcodecounts[i],
310 (stats->rcodecounts[i] * 100.0) / stats->num_completed);
315 (unsigned int)SAFE_DIV(stats->total_request_size,
316 stats->num_sent),
317 (unsigned int)SAFE_DIV(stats->total_response_size,
318 stats->num_completed));
323 SAFE_DIV(stats->num_completed, (((double)run_time) / MILLION)));
327 latency_avg = SAFE_DIV(stats->latency_sum, stats->num_completed);
331 (unsigned int)(stats->latency_min / MILLION),
332 (unsigned int)(stats->latency_min % MILLION),
333 (unsigned int)(stats->latency_max / MILLION),
334 (unsigned int)(stats->latency_max % MILLION));
335 if (stats->num_completed > 1) {
337 stddev(stats->latency_sum_squares, stats->latency_sum,
338 stats->num_completed) / MILLION);
352 stats_t *stats = &threads[i].stats;
355 total->rcodecounts[j] += stats->rcodecounts[j];
357 total->num_sent += stats->num_sent;
358 total->num_interrupted += stats->num_interrupted;
359 total->num_timedout += stats->num_timedout;
360 total->num_completed += stats->num_completed;
362 total->total_request_size += stats->total_request_size;
363 total->total_response_size += stats->total_response_size;
365 total->latency_sum += stats->latency_sum;
366 total->latency_sum_squares += stats->latency_sum_squares;
367 total->latency_min += stats->latency_min;
368 total->latency_max += stats->latency_max;
547 num_outstanding(const stats_t *stats)
549 return stats->num_sent - stats->num_completed - stats->num_timedout;
567 stats_t *stats;
585 stats = &tinfo->stats;
594 if (stats->num_sent < tinfo->max_outstanding &&
595 stats->num_sent % 2 == 1)
597 if (stats->num_completed == 0)
607 req_time = (MILLION * stats->num_sent) /
619 if (num_outstanding(stats) >= tinfo->max_outstanding) {
669 stats->num_sent++;
680 stats->num_sent--;
684 stats->total_request_size += length;
711 tinfo->stats.num_timedout++;
797 stats_t *stats;
809 stats = &tinfo->stats;
821 if (tinfo->done_sending && num_outstanding(stats) == 0)
898 stats->num_completed++;
899 stats->total_response_size += recvd[i].size;
900 stats->rcodecounts[recvd[i].rcode]++;
901 stats->latency_sum += latency;
902 stats->latency_sum_squares += (latency * latency);
903 if (latency < stats->latency_min ||
904 stats->num_completed == 1)
905 stats->latency_min = latency;
906 if (latency > stats->latency_max)
907 stats->latency_max = latency;
988 tinfo->stats.num_interrupted++;