uint32_t memory_used;
uint32_t __last_counter; /* hack for control_statistics_all */
uint32_t max_hop_count;
+#define MAX_HOP_COUNT_BUCKETS 16
+ uint32_t hop_count_bucket[MAX_HOP_COUNT_BUCKETS];
struct latency_counter call_latency;
struct latency_counter lockwait_latency;
struct latency_counter childwrite_latency;
struct ctdb_ltdb_header header;
struct ctdb_call *call;
struct ctdb_db_context *ctdb_db;
+ int tmp_count, bucket;
if (ctdb->methods == NULL) {
DEBUG(DEBUG_INFO,(__location__ " Failed ctdb_request_call. Transport is DOWN\n"));
}
CTDB_UPDATE_STAT(ctdb, max_hop_count, c->hopcount);
+ tmp_count = c->hopcount;
+ bucket = 0;
+ while (tmp_count) {
+ tmp_count >>= 2;
+ bucket++;
+ }
+ if (bucket >= MAX_HOP_COUNT_BUCKETS) {
+ bucket = MAX_HOP_COUNT_BUCKETS - 1;
+ }
+ CTDB_INCREMENT_STAT(ctdb, hop_count_bucket[bucket]);
+
/* if this nodes has done enough consecutive calls on the same record
then give them the record
STATISTICS_FIELD(memory_used),
STATISTICS_FIELD(max_hop_count),
};
+
tmp = s->statistics_current_time.tv_sec - s->statistics_start_time.tv_sec;
seconds = tmp%60;
tmp /= 60;
preflen?0:4, "",
*(uint32_t *)(fields[i].offset+(uint8_t *)s));
}
+ printf("Max hop count buckets:");
+ for (i=0;i<MAX_HOP_COUNT_BUCKETS;i++) {
+ printf(" %d", s->hop_count_bucket[i]);
+ }
+ printf("\n");
printf(" %-30s %.6f/%.6f/%.6f sec out of %d\n", "reclock_ctdbd MIN/AVG/MAX", s->reclock.ctdbd.min, s->reclock.ctdbd.num?s->reclock.ctdbd.total/s->reclock.ctdbd.num:0.0, s->reclock.ctdbd.max, s->reclock.ctdbd.num);
printf(" %-30s %.6f/%.6f/%.6f sec out of %d\n", "reclock_recd MIN/AVG/MAX", s->reclock.recd.min, s->reclock.recd.num?s->reclock.recd.total/s->reclock.recd.num:0.0, s->reclock.recd.max, s->reclock.recd.num);