lib/shiba/fuzzer.rb in shiba-0.3.0 vs lib/shiba/fuzzer.rb in shiba-0.4.0

- old
+ new

@@ -46,9 +46,10 @@ # Create fake table sizes based on the table's index count. # The more indexes, the bigger the table. Seems to rank tables fairly well. def guess_table_sizes index_counts = connection.count_indexes_by_table + return if index_counts.empty? # 90th table percentile based on number of indexes # round down so we don't blow up on small tables large_table_idx = (index_counts.size * 0.9).floor large_table_index_count = index_counts[large_table_idx]["index_count"].to_f