1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

stats: remove broken processing time statistic

This commit is contained in:
Steffen Vogel 2018-08-17 11:20:02 +02:00
parent 99ee9a08b7
commit b366408634
3 changed files with 4 additions and 25 deletions

View file

@ -44,7 +44,6 @@ enum stats_format {
enum stats_id {
STATS_SKIPPED, /**< Counter for skipped samples due to hooks. */
STATS_TIME, /**< The processing time per sample within VILLAsnode. */
STATS_REORDERED, /**< Counter for reordered samples. */
STATS_GAP_SAMPLE, /**< Histogram for inter sample timestamps (as sent by remote). */
STATS_GAP_RECEIVED, /**< Histogram for inter sample arrival time (as seen by this instance). */

View file

@ -190,21 +190,6 @@ static int stats_collect_process(struct hook *h, struct sample *smps[], unsigned
return 0;
}
__attribute__((unused))
static int stats_collect_write(struct hook *h, struct sample *smps[], unsigned *cnt)
{
struct stats_collect *p = (struct stats_collect *) h->_vd;
struct timespec ts_sent = time_now();
for (int i = 0; i < *cnt; i++)
stats_update(&p->stats, STATS_TIME, time_delta(&smps[i]->ts.received, &ts_sent));
stats_commit(&p->stats);
return 0;
}
static struct plugin p = {
.name = "stats",
.description = "Collect statistics for the current path",

View file

@ -34,7 +34,6 @@
struct stats_desc stats_metrics[] = {
{ "skipped", "samples", "Skipped samples and the distance between them", 25 },
{ "proc_time", "seconds", "The processing time per sample within VILLAsnode", 25 },
{ "reordered", "samples", "Reordered samples and the distance between them", 25 },
{ "gap_sent", "seconds", "Inter-message timestamps (as sent by remote)", 25 },
{ "gap_received", "seconds", "Inter-message arrival time (as received by this instance)", 25 },
@ -107,10 +106,9 @@ json_t * stats_json(struct stats *s)
json_t * stats_json_periodic(struct stats *s, struct node *n)
{
return json_pack("{ s: s, s: i, s: i, s: f, s: f, s: i, s: i }",
return json_pack("{ s: s, s: i, s: f, s: f, s: i, s: i }",
"node", node_name(n),
"received", hist_total(&s->histograms[STATS_OWD]),
"sent", hist_total(&s->histograms[STATS_TIME]),
"processed", hist_total(&s->histograms[STATS_OWD]),
"owd", hist_last(&s->histograms[STATS_OWD]),
"rate", 1.0 / hist_last(&s->histograms[STATS_GAP_SAMPLE]),
"dropped", hist_total(&s->histograms[STATS_REORDERED]),
@ -133,8 +131,7 @@ static struct table_column stats_cols[] = {
{ 10, "Rate last", "%f", "pkt/sec", TABLE_ALIGN_RIGHT },
{ 10, "Rate mean", "%f", "pkt/sec", TABLE_ALIGN_RIGHT },
{ 10, "Drop", "%ju", "pkts", TABLE_ALIGN_RIGHT },
{ 10, "Skip", "%ju", "pkts", TABLE_ALIGN_RIGHT },
{ 10, "Time", "%f", "secs", TABLE_ALIGN_RIGHT }
{ 10, "Skip", "%ju", "pkts", TABLE_ALIGN_RIGHT }
};
static struct table stats_table = {
@ -171,14 +168,12 @@ void stats_print_periodic(struct stats *s, FILE *f, enum stats_format fmt, int v
table_row(&stats_table,
node_name_short(n),
hist_total(&s->histograms[STATS_OWD]),
hist_total(&s->histograms[STATS_TIME]),
hist_last(&s->histograms[STATS_OWD]),
hist_mean(&s->histograms[STATS_OWD]),
1.0 / hist_last(&s->histograms[STATS_GAP_RECEIVED]),
1.0 / hist_mean(&s->histograms[STATS_GAP_RECEIVED]),
hist_total(&s->histograms[STATS_REORDERED]),
hist_total(&s->histograms[STATS_SKIPPED]),
hist_mean(&s->histograms[STATS_TIME])
hist_total(&s->histograms[STATS_SKIPPED])
);
break;