dictionary "id" { type "rand"; source_type "file"; source "test.dat"; } // this smack file will simulate traffic on gamemgr query "select_test" { query "SELECT ID from mytable where ID='$id' "; type "select_test"; has_result_set "y"; parsed "y"; } // define database client type client "smacker" { user "qatest"; // connect as this user pass "x"; // use this password host "lab-game05"; // connect to this host db "test"; // switch to this database socket "/var/lib/mysql/mysql.sock"; // this only applies to MySQL on a localhost query_barrel "1 select_test"; } main { smacker.init(); // initialize the clients // the number of rounds for each client smacker.set_num_rounds($2); smacker.create_threads($1); // first argument on the command line defines how many client instances // to fork. Anything after this will be done once for each client until // you collect the threads smacker.connect(); // you must connect after you fork smacker.unload_query_barrel(); // for each client fire the query barrel // it will now do the number of rounds specified by set_num_rounds() // on each round, query_barrel of the client is executed smacker.collect_threads(); // the master thread waits for the children, each child reports the stats // the stats are printed smacker.disconnect(); // the children now disconnect and exit }