Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -1,12 +1,16 @@
/**
* @file load_balancing_galera.cpp Checks how Maxscale balances load
*
* - also used for 'load_balancing_galera_pers1' and 'load_balancing_galera_pers10' tests (with 'persistpoolmax=1' and 'persistpoolmax=10' for all servers)
* - also used for 'load_balancing_galera_pers1' and 'load_balancing_galera_pers10' tests (with
*'persistpoolmax=1' and 'persistpoolmax=10' for all servers)
*
* - start two groups of threads: each group consists of 25 threads, each thread creates connections to RWSplit,
* threads from first group try to execute as many SELECTs as possible, from second group - one query per second
* - start two groups of threads: each group consists of 25 threads, each thread creates connections to
*RWSplit,
* threads from first group try to execute as many SELECTs as possible, from second group - one query per
*second
* - after 100 seconds all threads are stopped
* - check number of connections to every slave: test PASSED if COM_SELECT difference between slaves is not greater then 3 times and no
* - check number of connections to every slave: test PASSED if COM_SELECT difference between slaves is not
*greater then 3 times and no
* more then 10% of quesries went to Master
*/
@ -18,10 +22,10 @@
#include "big_load.h"
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
TestConnections * Test = new TestConnections(argc, argv);
TestConnections* Test = new TestConnections(argc, argv);
int master;
long int q;
int threads_num = 25;
@ -47,13 +51,23 @@ int main(int argc, char *argv[])
Test->galera->connect();
for (int i = 0; i < Test->galera->N; i++)
{
execute_query(Test->galera->nodes[i], (char *) "set global max_connections = 300;");
execute_query(Test->galera->nodes[i], (char *) "set global max_connect_errors = 100000;");
execute_query(Test->galera->nodes[i], (char*) "set global max_connections = 300;");
execute_query(Test->galera->nodes[i], (char*) "set global max_connect_errors = 100000;");
}
Test->galera->close_connections();
Test->set_timeout(1200);
load(&new_inserts[0], &new_selects[0], &selects[0], &inserts[0], threads_num, Test, &i1, &i2, 1, true, true);
load(&new_inserts[0],
&new_selects[0],
&selects[0],
&inserts[0],
threads_num,
Test,
&i1,
&i2,
1,
true,
true);
long int avr = (i1 + i2 ) / (Test->galera->N);
Test->tprintf("average number of quries per node %ld\n", avr);
@ -63,7 +77,7 @@ int main(int argc, char *argv[])
for (int i = 0; i < Test->galera->N; i++)
{
if ( i != master)
if (i != master)
{
q = new_selects[i] - selects[i];
if ((q > max_q) || (q < min_q))
@ -73,7 +87,7 @@ int main(int argc, char *argv[])
}
}
if ((new_selects[master] - selects[master]) > avr / 3 )
if ((new_selects[master] - selects[master]) > avr / 3)
{
Test->add_result(1,
"number of queries for master greater then 30%% of averange number of queries per node\n");
@ -83,8 +97,8 @@ int main(int argc, char *argv[])
Test->galera->connect();
for (int i = 0; i < Test->galera->N; i++)
{
execute_query(Test->galera->nodes[i], (char *) "flush hosts;");
execute_query(Test->galera->nodes[i], (char *) "set global max_connections = 151;");
execute_query(Test->galera->nodes[i], (char*) "flush hosts;");
execute_query(Test->galera->nodes[i], (char*) "set global max_connections = 151;");
}
Test->galera->close_connections();