summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl
diff options
context:
space:
mode:
Diffstat (limited to 'storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl')
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl16
1 files changed, 16 insertions, 0 deletions
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl
new file mode 100644
index 00000000000..322f0781719
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl
@@ -0,0 +1,16 @@
+$file=$ARGV[0];
+$total=$ARGV[1];
+$pct=$ARGV[2];
+
+open($fh, "<", $file) or die $!;
+while(readline($fh)) {
+ if (/(\d+) index entries checked \((\d+) had checksums/) {
+ if ($1 == $total && $2 >= $total*($pct-2)/100 && $2 <= $total*($pct+2)/100) {
+ printf("%d index entries had around %d checksums\n", $total, $total*$pct/100);
+ }
+ }elsif (/(\d+) table records had checksums/) {
+ if ($1 >= $total*($pct-2)/100 && $1 <= $total*($pct+2)/100) {
+ printf("Around %d table records had checksums\n", $total*$pct/100);
+ }
+ }
+}