Removed unnecessary calls to atomic_add
The polling statistics collection used atomic_add to increment values. This is not an optimal way to update statistical values. Moved to per thread values which are summed up when they are read. Moved the functions used to gather polling statistics to their own file and created a specific data type for statistics.
This commit is contained in:
@ -89,6 +89,7 @@
|
||||
#include <sys/wait.h>
|
||||
#include <sys/prctl.h>
|
||||
#include <sys/file.h>
|
||||
#include <statistics.h>
|
||||
|
||||
#define STRING_BUFFER_SIZE 1024
|
||||
#define PIDFD_CLOSED -1
|
||||
@ -1917,6 +1918,9 @@ int main(int argc, char **argv)
|
||||
goto return_main;
|
||||
}
|
||||
|
||||
/** Initialize statistics */
|
||||
ts_stats_init();
|
||||
|
||||
/* Init MaxScale poll system */
|
||||
poll_init();
|
||||
|
||||
|
Reference in New Issue
Block a user