|
11 | 11 | TestConfig.MutableSegmentMaxItemCount = 1_000_000;
|
12 | 12 | TestConfig.ThresholdForMergeOperationStart = 2_000_000;
|
13 | 13 | TestConfig.RecreateDatabases = true;
|
14 |
| -TestConfig.EnableParalelInserts = true; |
| 14 | +TestConfig.EnableParalelInserts = false; |
15 | 15 | TestConfig.DiskSegmentMaximumCachedBlockCount = 1;
|
16 | 16 | TestConfig.DiskCompressionBlockSize = 1024 * 1024 * 10;
|
17 | 17 | TestConfig.WALCompressionBlockSize = 1024 * 32 * 8;
|
|
45 | 45 | var b = new Benchmark();
|
46 | 46 | var test1 = new ZoneTreeTest1();
|
47 | 47 | var test2 = new ZoneTreeTest2();
|
48 |
| - var methods = new CompressionMethod[] |
| 48 | + var methods = new (CompressionMethod method, int level)[] |
49 | 49 | {
|
50 |
| - CompressionMethod.None, |
51 |
| - CompressionMethod.LZ4, |
52 |
| - CompressionMethod.Brotli, |
53 |
| - CompressionMethod.Zstd, |
54 |
| - CompressionMethod.Gzip |
| 50 | + (CompressionMethod.LZ4, CompressionLevels.LZ4Fastest), |
| 51 | + (CompressionMethod.Zstd, CompressionLevels.Zstd0), |
| 52 | + (CompressionMethod.Brotli, CompressionLevels.BrotliFastest), |
| 53 | + (CompressionMethod.Gzip, CompressionLevels.GzipFastest), |
| 54 | + (CompressionMethod.None, 0), |
55 | 55 | };
|
| 56 | + |
56 | 57 | test2.Count = test1.Count = 5_000_000;
|
57 | 58 | test2.WALMode = test1.WALMode = WriteAheadLogMode.None;
|
58 | 59 |
|
59 | 60 | b.NewSection("int-int insert");
|
60 |
| - foreach(var method in methods) |
| 61 | + foreach(var (method, level) in methods) |
61 | 62 | {
|
62 | 63 | test1.CompressionMethod = method;
|
| 64 | + test1.CompressionLevel = level; |
63 | 65 | var stats = b.Run(test1.Insert);
|
64 | 66 | test1.AddDatabaseFileUsage(stats);
|
65 | 67 | }
|
66 | 68 |
|
67 | 69 | b.NewSection("str-str insert");
|
68 |
| - foreach (var method in methods) |
| 70 | + foreach (var (method, level) in methods) |
69 | 71 | {
|
70 | 72 | test2.CompressionMethod = method;
|
| 73 | + test2.CompressionLevel = level; |
71 | 74 | var stats = b.Run(test2.Insert);
|
72 | 75 | test2.AddDatabaseFileUsage(stats);
|
73 | 76 | }
|
74 | 77 |
|
75 | 78 | b.NewSection("int-int iterate");
|
76 |
| - foreach (var method in methods) |
| 79 | + foreach (var (method, level) in methods) |
77 | 80 | {
|
78 | 81 | test1.CompressionMethod = method;
|
| 82 | + test1.CompressionLevel = level; |
79 | 83 | b.Run(test1.Iterate);
|
80 | 84 | }
|
81 | 85 |
|
82 | 86 | b.NewSection("str-str iterate");
|
83 |
| - foreach (var method in methods) |
| 87 | + foreach (var (method, level) in methods) |
84 | 88 | {
|
85 | 89 | test2.CompressionMethod = method;
|
| 90 | + test2.CompressionLevel = level; |
86 | 91 | b.Run(test2.Iterate);
|
87 | 92 | }
|
88 | 93 |
|
|
0 commit comments