X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=testaa.c;h=5e2cd93c8ed863676e8d5690c2d54f682c92049d;hb=f9656a800d0262a2096c3525c2160ce38bc16828;hp=aa1bf13b86f7cf6312c312aa618f8b295f2c0837;hpb=5ee174baa9b2c30e01dc0ca0dfa38f916f805636;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/testaa.c b/testaa.c index aa1bf13..5e2cd93 100644 --- a/testaa.c +++ b/testaa.c @@ -17,14 +17,15 @@ int main(int argc, const char *argv[]) { vg_info( "Database test\n" ); - if( !highscores_init( 200000 ) ) + if( !highscores_init( 200000, 100000 ) ) return 0; - + + srand(time(0)); vg_log( "Inserting test records...\n" ); - for( int i=0; i<200000; i++ ) + for( int i=0; i<5000; i++ ) { highscore_record entry; - entry.trackid = vg_randf() * 129.0f; + entry.trackid = vg_randf() * 138.0f; entry.points = vg_randf() * 10000.0f; entry.time = vg_randf() * 20000.0f; entry.playerid = rand() % 800; @@ -32,9 +33,30 @@ int main(int argc, const char *argv[]) highscores_push_record( &entry ); } + + for( int i=0; i<80; i++ ) + { + char rando[16]; + + int l=2+rand()%8; + for( int i=0; i