@@ -37,8 +37,6 @@ namespace {
37
37
38
38
conf.WriteBTreeIndex = writeBTreeIndex;
39
39
40
- conf.SliceSize = conf.Group (0 ).PageSize * 4 ;
41
-
42
40
return conf;
43
41
}
44
42
@@ -48,24 +46,33 @@ namespace {
48
46
void SetUp (::benchmark::State& state)
49
47
{
50
48
const bool useBTree = state.range (0 );
51
- const bool groups = state.range (1 );
52
- const bool history = state.range (2 );
49
+ const ui32 partsCount = state.range (1 );
50
+ const bool groups = state.range (2 );
51
+ const bool history = state.range (3 );
53
52
54
53
ui64 rows = history ? 300000 : 1000000 ;
55
54
if (BENCHMARK_MAKE_LARGE_PART) {
56
55
rows *= 10 ;
57
56
}
58
57
Mass = new NTest::TMass (new NTest::TModelStd (groups), rows);
59
- Subset = TMake (*Mass, PageConf (Mass->Model ->Scheme ->Families .size (), useBTree)).Mixed (0 , 1 , TMixerOne{ } , history ? 0.7 : 0 );
58
+ Subset = TMake (*Mass, PageConf (Mass->Model ->Scheme ->Families .size (), useBTree)).Mixed (0 , partsCount, TMixerRnd (partsCount) , history ? 0.7 : 0 );
60
59
60
+ ui64 dataBytes = 0 , dataPages = 0 , indexBytes = 0 ;
61
+ ui32 bTreeLevels = 0 ;
61
62
for (const auto & part : Subset->Flatten ) { // single part
62
- state. counters [ " DataBytes " ] = part->Stat .Bytes ;
63
- state. counters [ " DataPages " ] = IndexTools::CountMainPages (*part);
64
- state. counters [ " IndexBytes " ] = part->IndexesRawSize ;
63
+ dataBytes + = part->Stat .Bytes ;
64
+ dataPages + = IndexTools::CountMainPages (*part);
65
+ indexBytes + = part->IndexesRawSize ;
65
66
if (useBTree) {
66
- state. counters [ " Levels{0} " ] = part->IndexPages .BTreeGroups [0 ].LevelCount ;
67
+ bTreeLevels = Max (bTreeLevels, part->IndexPages .BTreeGroups [0 ].LevelCount ) ;
67
68
}
68
69
}
70
+ state.counters [" DataBytes" ] = dataBytes;
71
+ state.counters [" DataPages" ] = dataPages;
72
+ state.counters [" IndexBytes" ] = indexBytes;
73
+ if (useBTree) {
74
+ state.counters [" Levels{0}" ] = bTreeLevels;
75
+ }
69
76
70
77
if (history) {
71
78
Checker = new TCheckIter (*Subset, {new TTestEnv ()}, TRowVersion (0 , 8 ));
@@ -150,7 +157,7 @@ BENCHMARK_DEFINE_F(TPartFixture, Prev)(benchmark::State& state) {
150
157
151
158
BENCHMARK_DEFINE_F (TPartFixture, SeekKey)(benchmark::State& state) {
152
159
const bool useBTree = state.range (0 );
153
- const ESeek seek = ESeek (state.range (3 ));
160
+ const ESeek seek = ESeek (state.range (4 ));
154
161
155
162
TRowTool rowTool (*Subset->Scheme );
156
163
auto tags = TVector<TTag>();
@@ -178,9 +185,9 @@ BENCHMARK_DEFINE_F(TPartFixture, SeekKey)(benchmark::State& state) {
178
185
}
179
186
180
187
BENCHMARK_DEFINE_F (TPartFixture, DoReads)(benchmark::State& state) {
181
- const bool reverse = state.range (3 );
182
- const ESeek seek = static_cast <ESeek>(state.range (4 ));
183
- const ui32 items = state.range (5 );
188
+ const bool reverse = state.range (4 );
189
+ const ESeek seek = static_cast <ESeek>(state.range (5 ));
190
+ const ui32 items = state.range (6 );
184
191
185
192
for (auto _ : state) {
186
193
auto it = Mass->Saved .Any (Rnd);
@@ -200,8 +207,8 @@ BENCHMARK_DEFINE_F(TPartFixture, DoReads)(benchmark::State& state) {
200
207
}
201
208
202
209
BENCHMARK_DEFINE_F (TPartFixture, DoCharge)(benchmark::State& state) {
203
- const bool reverse = state.range (3 );
204
- const ui32 items = state.range (4 );
210
+ const bool reverse = state.range (4 );
211
+ const ui32 items = state.range (5 );
205
212
206
213
auto tags = TVector<TTag>();
207
214
for (auto c : Subset->Scheme ->Cols ) {
@@ -233,27 +240,31 @@ BENCHMARK_DEFINE_F(TPartFixture, BuildStats)(benchmark::State& state) {
233
240
BENCHMARK_REGISTER_F (TPartFixture, SeekRowId)
234
241
->ArgsProduct ({
235
242
/* b-tree */ {0 , 1 },
243
+ /* parts */ {4 },
236
244
/* groups: */ {0 , 1 },
237
245
/* history: */ {0 }})
238
246
->Unit(benchmark::kMicrosecond );
239
247
240
248
BENCHMARK_REGISTER_F (TPartFixture, Next)
241
249
->ArgsProduct ({
242
250
/* b-tree */ {0 , 1 },
251
+ /* parts */ {4 },
243
252
/* groups: */ {0 , 1 },
244
253
/* history: */ {0 }})
245
254
->Unit(benchmark::kMicrosecond );
246
255
247
256
BENCHMARK_REGISTER_F (TPartFixture, Prev)
248
257
->ArgsProduct ({
249
258
/* b-tree */ {0 , 1 },
259
+ /* parts */ {4 },
250
260
/* groups: */ {0 , 1 },
251
261
/* history: */ {0 }})
252
262
->Unit(benchmark::kMicrosecond );
253
263
254
264
BENCHMARK_REGISTER_F (TPartFixture, SeekKey)
255
265
->ArgsProduct ({
256
266
/* b-tree */ {0 , 1 },
267
+ /* parts */ {4 },
257
268
/* groups: */ {0 , 1 },
258
269
/* history: */ {0 },
259
270
/* ESeek: */ {1 }})
@@ -262,6 +273,7 @@ BENCHMARK_REGISTER_F(TPartFixture, SeekKey)
262
273
BENCHMARK_REGISTER_F (TPartFixture, DoReads)
263
274
->ArgsProduct ({
264
275
/* b-tree */ {0 , 1 },
276
+ /* parts */ {4 },
265
277
/* groups: */ {1 },
266
278
/* history: */ {1 },
267
279
/* reverse: */ {0 },
@@ -272,6 +284,7 @@ BENCHMARK_REGISTER_F(TPartFixture, DoReads)
272
284
BENCHMARK_REGISTER_F (TPartFixture, DoCharge)
273
285
->ArgsProduct ({
274
286
/* b-tree */ {0 , 1 },
287
+ /* parts */ {4 },
275
288
/* groups: */ {1 },
276
289
/* history: */ {1 },
277
290
/* reverse: */ {0 },
@@ -281,6 +294,7 @@ BENCHMARK_REGISTER_F(TPartFixture, DoCharge)
281
294
BENCHMARK_REGISTER_F (TPartFixture, BuildStats)
282
295
->ArgsProduct ({
283
296
/* b-tree */ {0 , 1 },
297
+ /* parts */ {1 , 4 , 10 },
284
298
/* groups: */ {0 , 1 },
285
299
/* history: */ {0 , 1 }})
286
300
->Unit(benchmark::kMicrosecond );
0 commit comments