Changeset 2093
- Timestamp:
- 03/19/08 20:34:20 (2 months ago)
- Files:
-
- Swishetest/trunk/t/050-C020-largeindex.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Swishetest/trunk/t/050-C020-largeindex.t
r2081 r2093 10 10 use Data::Dumper; 11 11 12 BEGIN { 13 unless ($ENV{TEST_HUGE_INDEX}) { 14 plan tests => 1; 15 ok( 1, "no test" ); 16 print STDERR "$0: not running huge index test, set TEST_HUGE_INDEX=1 to enable\n"; 17 exit(0); 12 13 SKIP: { 14 my $numtests = 9; 15 if( $ENV{TEST_LARGE_INDEX} ) { 16 plan tests => $numtests; 17 } else { 18 plan skip_all => "not running large index test, set TEST_LARGE_INDEX=1 to enable"; 18 19 } 19 plan tests => 9; 20 20 21 use File::Path qw(mkpath); 21 22 mkpath( ["blib/index"], 0, 0755); 22 23 my $base = "T050-$$"; # test 050 23 #unless (-e "blib/index/$base.index" ) { 24 #warn "base is $base\n"; 25 my (%out) = BuildIndex::build_index_from_external_program( 24 25 #skip $why, $how_many unless $have_some_feature; 26 #skip ("not running large index test, set TEST_LARGE_INDEX=1 to enable", $numtests) 27 #unless $ENV{TEST_LARGE_INDEX}; 26 28 27 # index sizes shown are for 2.4 branch on 32bit arch 28 29 #"./make_collection -min_words=1000 -max_words=1000 -num_files=100", 30 # # this makes 920K of data, 2.33MB index, 476k propfile 29 my (%out) = BuildIndex::build_index_from_external_program( 30 31 # index sizes shown are for 2.4 branch on 32bit arch 31 32 32 #"./make_collection -min_words=10000 -max_words=10000 -num_files=1000", 33 # # this makes 38M index, 40MB prop 34 35 #"./make_collection -min_words=100000 -max_words=100000 -num_files=1000", 36 # # this makes 325MB index, 392MB props 37 38 "./make_collection -min_words=100000 -max_words=100000 -num_files=10000", 39 # this makes: 3.84G blib/index/T050-28400.index.prop 40 # 3.16G blib/index/T050-28400.index 41 # 10K files x 100K words x ~5 chars/word = ~5GB of output 42 43 "blib/index/$base.index", 44 "", # default config 45 "-e" # economy option 46 ); 33 #"./make_collection -min_words=1000 -max_words=1000 -num_files=100", 34 # # this makes 920K of data, 2.33MB index, 476k propfile 35 36 #"./make_collection -min_words=10000 -max_words=10000 -num_files=1000", 37 # # this makes 38M index, 40MB prop 38 39 #"./make_collection -min_words=100000 -max_words=100000 -num_files=1000", 40 # # this makes 325MB index, 392MB props 41 42 "./make_collection -min_words=100000 -max_words=100000 -num_files=10000", 43 # this makes: 3.84G blib/index/T050-28400.index.prop 44 # 3.16G blib/index/T050-28400.index 45 # 10K files x 100K words x ~5 chars/word = ~5GB of output 46 47 "blib/index/$base.index", 48 "", # default config 49 "-e" # economy option 50 ); 47 51 48 # the first real test here is if you get an error indexing above :) 49 50 print STDERR "$0: DUMPING data for debug: " . Dumper( \%out ); 52 # the first real test here is if you get an error indexing above :) 51 53 52 cmp_ok( scalar(keys(%out)), '>', 2, "Indexing output" ); 53 #} 54 print STDERR "$0: DUMPING data for debug: " . Dumper( \%out ); 55 56 cmp_ok( scalar(keys(%out)), '>', 2, "Indexing output" ); 54 57 55 58 cmp_ok( $out{unique}, '==', 45_398, 'unique words indexed' ); … … 74 77 75 78 79 80 __END__ 81 SKIP: { 82 skip $why, $how_many unless $have_some_feature; 83 84 ok( foo(), $test_name ); 85 is( foo(42), 23, $test_name ); 86 }; 87
