// Total number of open connections
unsigned int open_connections;
+ // New connections
+ unsigned int connections;
+
size_t bytes_sent;
size_t total_bytes_sent;
};
char* bps = format_size(stats->bytes_sent * 8 / delta, FIREPERF_FORMAT_BITS);
INFO(conf, "--- %s --------------------\n", timestamp);
+ INFO(conf, " %-20s: %16.2f/s\n", "New Connections", stats->connections / delta);
INFO(conf, " %-20s: %18s/s\n", "Current Bandwidth", bps);
INFO(conf, " %-20s: %20s\n", "Total Bytes Sent", total_bytes_sent);
stats->last_printed = now;
// Reset statistics
+ stats->connections = 0;
stats->bytes_sent = 0;
// Cleanup
}
stats.open_connections++;
+ stats.connections++;
}
int fds = epoll_wait(epollfd, events, EPOLL_MAX_EVENTS, -1);
// Total number of open connections
unsigned int open_connections;
+ // New connections
+ unsigned int connections;
+
size_t bytes_received;
size_t total_bytes_received;
};
INFO( conf, "--- %s --------------------\n", timestamp);
DEBUG(conf, " %-20s: %19.4fs\n", "Delta", delta);
INFO( conf, " %-20s: %20u\n", "Open Connection(s)", stats->open_connections);
+ INFO( conf, " %-20s: %16.2f/s\n", "New Connections", stats->connections / delta);
INFO( conf, " %-20s: %18s/s\n", "Current Bandwidth", bps);
INFO( conf, " %-20s: %20s\n", "Total Bytes Received", total_bytes_received);
stats->last_printed = now;
// Reset statistics
+ stats->connections = 0;
stats->bytes_received = 0;
// Cleanup
// A connection has been opened
stats.open_connections++;
+ stats.connections++;
// Handle timer events
} else if (fd == timerfd) {