Lines Matching refs:stats

90 void server_stats_init(struct ub_server_stats* stats, struct config_file* cfg)  in server_stats_init()  argument
92 memset(stats, 0, sizeof(*stats)); in server_stats_init()
93 stats->extended = cfg->stat_extended; in server_stats_init()
96 void server_stats_querymiss(struct ub_server_stats* stats, struct worker* worker) in server_stats_querymiss() argument
98 stats->num_queries_missed_cache++; in server_stats_querymiss()
99 stats->sum_query_list_size += worker->env.mesh->all.count; in server_stats_querymiss()
100 if((long long)worker->env.mesh->all.count > stats->max_query_list_size) in server_stats_querymiss()
101 stats->max_query_list_size = (long long)worker->env.mesh->all.count; in server_stats_querymiss()
104 void server_stats_prefetch(struct ub_server_stats* stats, struct worker* worker) in server_stats_prefetch() argument
106 stats->num_queries_prefetch++; in server_stats_prefetch()
108 stats->sum_query_list_size += worker->env.mesh->all.count; in server_stats_prefetch()
109 if((long long)worker->env.mesh->all.count > stats->max_query_list_size) in server_stats_prefetch()
110 stats->max_query_list_size = (long long)worker->env.mesh->all.count; in server_stats_prefetch()
113 void server_stats_log(struct ub_server_stats* stats, struct worker* worker, in server_stats_log() argument
119 threadnum, (unsigned)stats->num_queries, in server_stats_log()
120 (unsigned)(stats->num_queries - in server_stats_log()
121 stats->num_queries_missed_cache), in server_stats_log()
122 (unsigned)stats->num_queries_missed_cache, in server_stats_log()
123 (unsigned)stats->num_queries_prefetch, in server_stats_log()
124 (unsigned)stats->num_queries_ip_ratelimited); in server_stats_log()
127 (unsigned)stats->max_query_list_size, in server_stats_log()
128 (stats->num_queries_missed_cache+stats->num_queries_prefetch)? in server_stats_log()
129 (double)stats->sum_query_list_size/ in server_stats_log()
130 (double)(stats->num_queries_missed_cache+ in server_stats_log()
131 stats->num_queries_prefetch) : 0.0, in server_stats_log()
262 s->svr = worker->stats; in server_stats_compile()
523 void server_stats_insquery(struct ub_server_stats* stats, struct comm_point* c, in server_stats_insquery() argument
529 stats->qtype[qtype]++; in server_stats_insquery()
530 else stats->qtype_big++; in server_stats_insquery()
532 stats->qclass[qclass]++; in server_stats_insquery()
533 else stats->qclass_big++; in server_stats_insquery()
534 stats->qopcode[ LDNS_OPCODE_WIRE(sldns_buffer_begin(c->buffer)) ]++; in server_stats_insquery()
536 stats->qtcp++; in server_stats_insquery()
538 stats->qtls++; in server_stats_insquery()
541 stats->qtls_resume++; in server_stats_insquery()
544 stats->qhttps++; in server_stats_insquery()
548 stats->qipv6++; in server_stats_insquery()
550 stats->qbit_QR++; in server_stats_insquery()
552 stats->qbit_AA++; in server_stats_insquery()
554 stats->qbit_TC++; in server_stats_insquery()
556 stats->qbit_RD++; in server_stats_insquery()
558 stats->qbit_RA++; in server_stats_insquery()
560 stats->qbit_Z++; in server_stats_insquery()
562 stats->qbit_AD++; in server_stats_insquery()
564 stats->qbit_CD++; in server_stats_insquery()
566 stats->qEDNS++; in server_stats_insquery()
568 stats->qEDNS_DO++; in server_stats_insquery()
572 void server_stats_insrcode(struct ub_server_stats* stats, sldns_buffer* buf) in server_stats_insrcode() argument
574 if(stats->extended && sldns_buffer_limit(buf) != 0) { in server_stats_insrcode()
576 stats->ans_rcode[r] ++; in server_stats_insrcode()
578 stats->ans_rcode_nodata ++; in server_stats_insrcode()
582 void server_stats_downstream_cookie(struct ub_server_stats* stats, in server_stats_downstream_cookie() argument
587 stats->num_queries_cookie_valid++; in server_stats_downstream_cookie()
589 stats->num_queries_cookie_client++; in server_stats_downstream_cookie()
591 stats->num_queries_cookie_invalid++; in server_stats_downstream_cookie()