@peerbit/indexer-tests 1.1.20 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"benchmarks.d.ts","sourceRoot":"","sources":["../../src/benchmarks.ts"],"names":[],"mappings":"AACA,OAAO,EAMN,KAAK,OAAO,EAQZ,MAAM,4BAA4B,CAAC;AAktBpC,eAAO,MAAM,UAAU,GACtB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAClE,OAAM,WAAW,GAAG,SAAuB,kBAS3C,CAAC"}
1
+ {"version":3,"file":"benchmarks.d.ts","sourceRoot":"","sources":["../../src/benchmarks.ts"],"names":[],"mappings":"AACA,OAAO,EAMN,KAAK,OAAO,EAQZ,MAAM,4BAA4B,CAAC;AAitBpC,eAAO,MAAM,UAAU,GACtB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EAClE,OAAM,WAAW,GAAG,SAAuB,kBAS3C,CAAC"}
@@ -1,11 +1,36 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
2
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
3
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
4
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
5
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
6
+ var _, done = false;
7
+ for (var i = decorators.length - 1; i >= 0; i--) {
8
+ var context = {};
9
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
10
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
11
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
12
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
13
+ if (kind === "accessor") {
14
+ if (result === void 0) continue;
15
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
16
+ if (_ = accept(result.get)) descriptor.get = _;
17
+ if (_ = accept(result.set)) descriptor.set = _;
18
+ if (_ = accept(result.init)) initializers.unshift(_);
19
+ }
20
+ else if (_ = accept(result)) {
21
+ if (kind === "field") initializers.unshift(_);
22
+ else descriptor[key] = _;
23
+ }
24
+ }
25
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
26
+ done = true;
6
27
  };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
28
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
29
+ var useValue = arguments.length > 2;
30
+ for (var i = 0; i < initializers.length; i++) {
31
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
32
+ }
33
+ return useValue ? value : void 0;
9
34
  };
10
35
  import { field, vec } from "@dao-xyz/borsh";
11
36
  import { And, BoolQuery, Compare, IntegerCompare, Or, Query, Sort, StringMatch, getIdProperty, id, } from "@peerbit/indexer-interface";
@@ -29,22 +54,31 @@ const setup = async (properties, createIndicies, type = "transient") => {
29
54
  };
30
55
  let preFillCount = 2e4;
31
56
  const stringBenchmark = async (createIndicies, type = "transient") => {
32
- class StringDocument {
33
- id;
34
- string;
35
- constructor(id, string) {
36
- this.id = id;
37
- this.string = string;
38
- }
39
- }
40
- __decorate([
41
- id({ type: "string" }),
42
- __metadata("design:type", String)
43
- ], StringDocument.prototype, "id", void 0);
44
- __decorate([
45
- field({ type: "string" }),
46
- __metadata("design:type", String)
47
- ], StringDocument.prototype, "string", void 0);
57
+ let StringDocument = (() => {
58
+ let _id_decorators;
59
+ let _id_initializers = [];
60
+ let _id_extraInitializers = [];
61
+ let _string_decorators;
62
+ let _string_initializers = [];
63
+ let _string_extraInitializers = [];
64
+ return class StringDocument {
65
+ static {
66
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
67
+ _id_decorators = [id({ type: "string" })];
68
+ _string_decorators = [field({ type: "string" })];
69
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
70
+ __esDecorate(null, null, _string_decorators, { kind: "field", name: "string", static: false, private: false, access: { has: obj => "string" in obj, get: obj => obj.string, set: (obj, value) => { obj.string = value; } }, metadata: _metadata }, _string_initializers, _string_extraInitializers);
71
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
72
+ }
73
+ id = __runInitializers(this, _id_initializers, void 0);
74
+ string = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _string_initializers, void 0));
75
+ constructor(id, string) {
76
+ __runInitializers(this, _string_extraInitializers);
77
+ this.id = id;
78
+ this.string = string;
79
+ }
80
+ };
81
+ })();
48
82
  const fs = await import("fs");
49
83
  const stringIndexPreFilled = await setup({ schema: StringDocument }, createIndicies, type);
50
84
  let docCount = preFillCount;
@@ -71,7 +105,6 @@ const stringBenchmark = async (createIndicies, type = "transient") => {
71
105
  });
72
106
  })
73
107
  .add("string count no-matches - " + type, async () => {
74
- const out = Math.random() > 0.5 ? true : false;
75
108
  await stringIndexPreFilled.store.count({
76
109
  query: new StringMatch({ key: "string", value: uuid() }),
77
110
  });
@@ -90,22 +123,31 @@ const stringBenchmark = async (createIndicies, type = "transient") => {
90
123
  console.table(suite.table());
91
124
  };
92
125
  const boolQueryBenchmark = async (createIndicies, type = "transient") => {
93
- class BoolQueryDocument {
94
- id;
95
- bool;
96
- constructor(id, bool) {
97
- this.id = id;
98
- this.bool = bool;
99
- }
100
- }
101
- __decorate([
102
- id({ type: "string" }),
103
- __metadata("design:type", String)
104
- ], BoolQueryDocument.prototype, "id", void 0);
105
- __decorate([
106
- field({ type: "bool" }),
107
- __metadata("design:type", Boolean)
108
- ], BoolQueryDocument.prototype, "bool", void 0);
126
+ let BoolQueryDocument = (() => {
127
+ let _id_decorators;
128
+ let _id_initializers = [];
129
+ let _id_extraInitializers = [];
130
+ let _bool_decorators;
131
+ let _bool_initializers = [];
132
+ let _bool_extraInitializers = [];
133
+ return class BoolQueryDocument {
134
+ static {
135
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
136
+ _id_decorators = [id({ type: "string" })];
137
+ _bool_decorators = [field({ type: "bool" })];
138
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
139
+ __esDecorate(null, null, _bool_decorators, { kind: "field", name: "bool", static: false, private: false, access: { has: obj => "bool" in obj, get: obj => obj.bool, set: (obj, value) => { obj.bool = value; } }, metadata: _metadata }, _bool_initializers, _bool_extraInitializers);
140
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
141
+ }
142
+ id = __runInitializers(this, _id_initializers, void 0);
143
+ bool = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _bool_initializers, void 0));
144
+ constructor(id, bool) {
145
+ __runInitializers(this, _bool_extraInitializers);
146
+ this.id = id;
147
+ this.bool = bool;
148
+ }
149
+ };
150
+ })();
109
151
  const fs = await import("fs");
110
152
  const boolIndexPrefilled = await setup({ schema: BoolQueryDocument }, createIndicies, type);
111
153
  let docCount = preFillCount;
@@ -153,22 +195,31 @@ const boolQueryBenchmark = async (createIndicies, type = "transient") => {
153
195
  console.table(suite.table());
154
196
  };
155
197
  const inequalityBenchmark = async (createIndicies, type = "transient") => {
156
- class NumberQueryDocument {
157
- id;
158
- number;
159
- constructor(id, number) {
160
- this.id = id;
161
- this.number = number;
162
- }
163
- }
164
- __decorate([
165
- id({ type: "string" }),
166
- __metadata("design:type", String)
167
- ], NumberQueryDocument.prototype, "id", void 0);
168
- __decorate([
169
- field({ type: "u32" }),
170
- __metadata("design:type", Number)
171
- ], NumberQueryDocument.prototype, "number", void 0);
198
+ let NumberQueryDocument = (() => {
199
+ let _id_decorators;
200
+ let _id_initializers = [];
201
+ let _id_extraInitializers = [];
202
+ let _number_decorators;
203
+ let _number_initializers = [];
204
+ let _number_extraInitializers = [];
205
+ return class NumberQueryDocument {
206
+ static {
207
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
208
+ _id_decorators = [id({ type: "string" })];
209
+ _number_decorators = [field({ type: "u32" })];
210
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
211
+ __esDecorate(null, null, _number_decorators, { kind: "field", name: "number", static: false, private: false, access: { has: obj => "number" in obj, get: obj => obj.number, set: (obj, value) => { obj.number = value; } }, metadata: _metadata }, _number_initializers, _number_extraInitializers);
212
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
213
+ }
214
+ id = __runInitializers(this, _id_initializers, void 0);
215
+ number = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _number_initializers, void 0));
216
+ constructor(id, number) {
217
+ __runInitializers(this, _number_extraInitializers);
218
+ this.id = id;
219
+ this.number = number;
220
+ }
221
+ };
222
+ })();
172
223
  const fs = await import("fs");
173
224
  const numberIndexPrefilled = await setup({ schema: NumberQueryDocument }, createIndicies, type);
174
225
  let docCount = 10e4;
@@ -224,22 +275,31 @@ const inequalityBenchmark = async (createIndicies, type = "transient") => {
224
275
  console.table(suite.table());
225
276
  };
226
277
  const getBenchmark = async (createIndicies, type = "transient") => {
227
- class BoolQueryDocument {
228
- id;
229
- bool;
230
- constructor(id, bool) {
231
- this.id = id;
232
- this.bool = bool;
233
- }
234
- }
235
- __decorate([
236
- id({ type: "string" }),
237
- __metadata("design:type", String)
238
- ], BoolQueryDocument.prototype, "id", void 0);
239
- __decorate([
240
- field({ type: "bool" }),
241
- __metadata("design:type", Boolean)
242
- ], BoolQueryDocument.prototype, "bool", void 0);
278
+ let BoolQueryDocument = (() => {
279
+ let _id_decorators;
280
+ let _id_initializers = [];
281
+ let _id_extraInitializers = [];
282
+ let _bool_decorators;
283
+ let _bool_initializers = [];
284
+ let _bool_extraInitializers = [];
285
+ return class BoolQueryDocument {
286
+ static {
287
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
288
+ _id_decorators = [id({ type: "string" })];
289
+ _bool_decorators = [field({ type: "bool" })];
290
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
291
+ __esDecorate(null, null, _bool_decorators, { kind: "field", name: "bool", static: false, private: false, access: { has: obj => "bool" in obj, get: obj => obj.bool, set: (obj, value) => { obj.bool = value; } }, metadata: _metadata }, _bool_initializers, _bool_extraInitializers);
292
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
293
+ }
294
+ id = __runInitializers(this, _id_initializers, void 0);
295
+ bool = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _bool_initializers, void 0));
296
+ constructor(id, bool) {
297
+ __runInitializers(this, _bool_extraInitializers);
298
+ this.id = id;
299
+ this.bool = bool;
300
+ }
301
+ };
302
+ })();
243
303
  const fs = await import("fs");
244
304
  const boolIndexPrefilled = await setup({ schema: BoolQueryDocument }, createIndicies, type);
245
305
  let docCount = preFillCount;
@@ -269,32 +329,49 @@ const getBenchmark = async (createIndicies, type = "transient") => {
269
329
  console.table(suite.table());
270
330
  };
271
331
  const nestedBoolQueryBenchmark = async (createIndicies, type = "transient") => {
272
- class Nested {
273
- bool;
274
- constructor(bool) {
275
- this.bool = bool;
276
- }
277
- }
278
- __decorate([
279
- field({ type: "bool" }),
280
- __metadata("design:type", Boolean)
281
- ], Nested.prototype, "bool", void 0);
282
- class NestedBoolQueryDocument {
283
- id;
284
- nested;
285
- constructor(id, bool) {
286
- this.id = id;
287
- this.nested = new Nested(bool);
288
- }
289
- }
290
- __decorate([
291
- id({ type: "string" }),
292
- __metadata("design:type", String)
293
- ], NestedBoolQueryDocument.prototype, "id", void 0);
294
- __decorate([
295
- field({ type: Nested }),
296
- __metadata("design:type", Nested)
297
- ], NestedBoolQueryDocument.prototype, "nested", void 0);
332
+ let Nested = (() => {
333
+ let _bool_decorators;
334
+ let _bool_initializers = [];
335
+ let _bool_extraInitializers = [];
336
+ return class Nested {
337
+ static {
338
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
339
+ _bool_decorators = [field({ type: "bool" })];
340
+ __esDecorate(null, null, _bool_decorators, { kind: "field", name: "bool", static: false, private: false, access: { has: obj => "bool" in obj, get: obj => obj.bool, set: (obj, value) => { obj.bool = value; } }, metadata: _metadata }, _bool_initializers, _bool_extraInitializers);
341
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
342
+ }
343
+ bool = __runInitializers(this, _bool_initializers, void 0);
344
+ constructor(bool) {
345
+ __runInitializers(this, _bool_extraInitializers);
346
+ this.bool = bool;
347
+ }
348
+ };
349
+ })();
350
+ let NestedBoolQueryDocument = (() => {
351
+ let _id_decorators;
352
+ let _id_initializers = [];
353
+ let _id_extraInitializers = [];
354
+ let _nested_decorators;
355
+ let _nested_initializers = [];
356
+ let _nested_extraInitializers = [];
357
+ return class NestedBoolQueryDocument {
358
+ static {
359
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
360
+ _id_decorators = [id({ type: "string" })];
361
+ _nested_decorators = [field({ type: Nested })];
362
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
363
+ __esDecorate(null, null, _nested_decorators, { kind: "field", name: "nested", static: false, private: false, access: { has: obj => "nested" in obj, get: obj => obj.nested, set: (obj, value) => { obj.nested = value; } }, metadata: _metadata }, _nested_initializers, _nested_extraInitializers);
364
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
365
+ }
366
+ id = __runInitializers(this, _id_initializers, void 0);
367
+ nested = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _nested_initializers, void 0));
368
+ constructor(id, bool) {
369
+ __runInitializers(this, _nested_extraInitializers);
370
+ this.id = id;
371
+ this.nested = new Nested(bool);
372
+ }
373
+ };
374
+ })();
298
375
  const fs = await import("fs");
299
376
  const boolIndexPrefilled = await setup({ schema: NestedBoolQueryDocument }, createIndicies, type);
300
377
  let docCount = preFillCount;
@@ -329,32 +406,49 @@ const nestedBoolQueryBenchmark = async (createIndicies, type = "transient") => {
329
406
  console.table(suite.table());
330
407
  };
331
408
  const shapedQueryBenchmark = async (createIndicies, type = "transient") => {
332
- class Nested {
333
- bool;
334
- constructor(bool) {
335
- this.bool = bool;
336
- }
337
- }
338
- __decorate([
339
- field({ type: "bool" }),
340
- __metadata("design:type", Boolean)
341
- ], Nested.prototype, "bool", void 0);
342
- class NestedBoolQueryDocument {
343
- id;
344
- nested;
345
- constructor(id, nested) {
346
- this.id = id;
347
- this.nested = nested;
348
- }
349
- }
350
- __decorate([
351
- id({ type: "string" }),
352
- __metadata("design:type", String)
353
- ], NestedBoolQueryDocument.prototype, "id", void 0);
354
- __decorate([
355
- field({ type: vec(Nested) }),
356
- __metadata("design:type", Array)
357
- ], NestedBoolQueryDocument.prototype, "nested", void 0);
409
+ let Nested = (() => {
410
+ let _bool_decorators;
411
+ let _bool_initializers = [];
412
+ let _bool_extraInitializers = [];
413
+ return class Nested {
414
+ static {
415
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
416
+ _bool_decorators = [field({ type: "bool" })];
417
+ __esDecorate(null, null, _bool_decorators, { kind: "field", name: "bool", static: false, private: false, access: { has: obj => "bool" in obj, get: obj => obj.bool, set: (obj, value) => { obj.bool = value; } }, metadata: _metadata }, _bool_initializers, _bool_extraInitializers);
418
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
419
+ }
420
+ bool = __runInitializers(this, _bool_initializers, void 0);
421
+ constructor(bool) {
422
+ __runInitializers(this, _bool_extraInitializers);
423
+ this.bool = bool;
424
+ }
425
+ };
426
+ })();
427
+ let NestedBoolQueryDocument = (() => {
428
+ let _id_decorators;
429
+ let _id_initializers = [];
430
+ let _id_extraInitializers = [];
431
+ let _nested_decorators;
432
+ let _nested_initializers = [];
433
+ let _nested_extraInitializers = [];
434
+ return class NestedBoolQueryDocument {
435
+ static {
436
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
437
+ _id_decorators = [id({ type: "string" })];
438
+ _nested_decorators = [field({ type: vec(Nested) })];
439
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
440
+ __esDecorate(null, null, _nested_decorators, { kind: "field", name: "nested", static: false, private: false, access: { has: obj => "nested" in obj, get: obj => obj.nested, set: (obj, value) => { obj.nested = value; } }, metadata: _metadata }, _nested_initializers, _nested_extraInitializers);
441
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
442
+ }
443
+ id = __runInitializers(this, _id_initializers, void 0);
444
+ nested = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _nested_initializers, void 0));
445
+ constructor(id, nested) {
446
+ __runInitializers(this, _nested_extraInitializers);
447
+ this.id = id;
448
+ this.nested = nested;
449
+ }
450
+ };
451
+ })();
358
452
  const fs = await import("fs");
359
453
  const boolIndexPrefilled = await setup({ schema: NestedBoolQueryDocument }, createIndicies, type);
360
454
  let docCount = 1e4;
@@ -407,64 +501,80 @@ const shapedQueryBenchmark = async (createIndicies, type = "transient") => {
407
501
  console.table(suite.table());
408
502
  };
409
503
  const multiFieldQueryBenchmark = async (createIndicies, type = "transient") => {
410
- class ReplicationRangeIndexableU32 {
411
- id;
412
- hash;
413
- timestamp;
414
- start1;
415
- end1;
416
- start2;
417
- end2;
418
- width;
419
- mode;
420
- constructor(properties) {
421
- this.id = properties.id || uuid();
422
- this.hash = properties.hash;
423
- this.timestamp = properties.timestamp;
424
- this.start1 = properties.start1;
425
- this.end1 = properties.end1;
426
- this.start2 = properties.start2;
427
- this.end2 = properties.end2;
428
- this.width = properties.width;
429
- this.mode = properties.mode;
430
- }
431
- }
432
- __decorate([
433
- id({ type: "string" }),
434
- __metadata("design:type", String)
435
- ], ReplicationRangeIndexableU32.prototype, "id", void 0);
436
- __decorate([
437
- field({ type: "string" }),
438
- __metadata("design:type", String)
439
- ], ReplicationRangeIndexableU32.prototype, "hash", void 0);
440
- __decorate([
441
- field({ type: "u64" }),
442
- __metadata("design:type", BigInt)
443
- ], ReplicationRangeIndexableU32.prototype, "timestamp", void 0);
444
- __decorate([
445
- field({ type: "u32" }),
446
- __metadata("design:type", Number)
447
- ], ReplicationRangeIndexableU32.prototype, "start1", void 0);
448
- __decorate([
449
- field({ type: "u32" }),
450
- __metadata("design:type", Number)
451
- ], ReplicationRangeIndexableU32.prototype, "end1", void 0);
452
- __decorate([
453
- field({ type: "u32" }),
454
- __metadata("design:type", Number)
455
- ], ReplicationRangeIndexableU32.prototype, "start2", void 0);
456
- __decorate([
457
- field({ type: "u32" }),
458
- __metadata("design:type", Number)
459
- ], ReplicationRangeIndexableU32.prototype, "end2", void 0);
460
- __decorate([
461
- field({ type: "u32" }),
462
- __metadata("design:type", Number)
463
- ], ReplicationRangeIndexableU32.prototype, "width", void 0);
464
- __decorate([
465
- field({ type: "u8" }),
466
- __metadata("design:type", Number)
467
- ], ReplicationRangeIndexableU32.prototype, "mode", void 0);
504
+ let ReplicationRangeIndexableU32 = (() => {
505
+ let _id_decorators;
506
+ let _id_initializers = [];
507
+ let _id_extraInitializers = [];
508
+ let _hash_decorators;
509
+ let _hash_initializers = [];
510
+ let _hash_extraInitializers = [];
511
+ let _timestamp_decorators;
512
+ let _timestamp_initializers = [];
513
+ let _timestamp_extraInitializers = [];
514
+ let _start1_decorators;
515
+ let _start1_initializers = [];
516
+ let _start1_extraInitializers = [];
517
+ let _end1_decorators;
518
+ let _end1_initializers = [];
519
+ let _end1_extraInitializers = [];
520
+ let _start2_decorators;
521
+ let _start2_initializers = [];
522
+ let _start2_extraInitializers = [];
523
+ let _end2_decorators;
524
+ let _end2_initializers = [];
525
+ let _end2_extraInitializers = [];
526
+ let _width_decorators;
527
+ let _width_initializers = [];
528
+ let _width_extraInitializers = [];
529
+ let _mode_decorators;
530
+ let _mode_initializers = [];
531
+ let _mode_extraInitializers = [];
532
+ return class ReplicationRangeIndexableU32 {
533
+ static {
534
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
535
+ _id_decorators = [id({ type: "string" })];
536
+ _hash_decorators = [field({ type: "string" })];
537
+ _timestamp_decorators = [field({ type: "u64" })];
538
+ _start1_decorators = [field({ type: "u32" })];
539
+ _end1_decorators = [field({ type: "u32" })];
540
+ _start2_decorators = [field({ type: "u32" })];
541
+ _end2_decorators = [field({ type: "u32" })];
542
+ _width_decorators = [field({ type: "u32" })];
543
+ _mode_decorators = [field({ type: "u8" })];
544
+ __esDecorate(null, null, _id_decorators, { kind: "field", name: "id", static: false, private: false, access: { has: obj => "id" in obj, get: obj => obj.id, set: (obj, value) => { obj.id = value; } }, metadata: _metadata }, _id_initializers, _id_extraInitializers);
545
+ __esDecorate(null, null, _hash_decorators, { kind: "field", name: "hash", static: false, private: false, access: { has: obj => "hash" in obj, get: obj => obj.hash, set: (obj, value) => { obj.hash = value; } }, metadata: _metadata }, _hash_initializers, _hash_extraInitializers);
546
+ __esDecorate(null, null, _timestamp_decorators, { kind: "field", name: "timestamp", static: false, private: false, access: { has: obj => "timestamp" in obj, get: obj => obj.timestamp, set: (obj, value) => { obj.timestamp = value; } }, metadata: _metadata }, _timestamp_initializers, _timestamp_extraInitializers);
547
+ __esDecorate(null, null, _start1_decorators, { kind: "field", name: "start1", static: false, private: false, access: { has: obj => "start1" in obj, get: obj => obj.start1, set: (obj, value) => { obj.start1 = value; } }, metadata: _metadata }, _start1_initializers, _start1_extraInitializers);
548
+ __esDecorate(null, null, _end1_decorators, { kind: "field", name: "end1", static: false, private: false, access: { has: obj => "end1" in obj, get: obj => obj.end1, set: (obj, value) => { obj.end1 = value; } }, metadata: _metadata }, _end1_initializers, _end1_extraInitializers);
549
+ __esDecorate(null, null, _start2_decorators, { kind: "field", name: "start2", static: false, private: false, access: { has: obj => "start2" in obj, get: obj => obj.start2, set: (obj, value) => { obj.start2 = value; } }, metadata: _metadata }, _start2_initializers, _start2_extraInitializers);
550
+ __esDecorate(null, null, _end2_decorators, { kind: "field", name: "end2", static: false, private: false, access: { has: obj => "end2" in obj, get: obj => obj.end2, set: (obj, value) => { obj.end2 = value; } }, metadata: _metadata }, _end2_initializers, _end2_extraInitializers);
551
+ __esDecorate(null, null, _width_decorators, { kind: "field", name: "width", static: false, private: false, access: { has: obj => "width" in obj, get: obj => obj.width, set: (obj, value) => { obj.width = value; } }, metadata: _metadata }, _width_initializers, _width_extraInitializers);
552
+ __esDecorate(null, null, _mode_decorators, { kind: "field", name: "mode", static: false, private: false, access: { has: obj => "mode" in obj, get: obj => obj.mode, set: (obj, value) => { obj.mode = value; } }, metadata: _metadata }, _mode_initializers, _mode_extraInitializers);
553
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
554
+ }
555
+ id = __runInitializers(this, _id_initializers, void 0);
556
+ hash = (__runInitializers(this, _id_extraInitializers), __runInitializers(this, _hash_initializers, void 0));
557
+ timestamp = (__runInitializers(this, _hash_extraInitializers), __runInitializers(this, _timestamp_initializers, void 0));
558
+ start1 = (__runInitializers(this, _timestamp_extraInitializers), __runInitializers(this, _start1_initializers, void 0));
559
+ end1 = (__runInitializers(this, _start1_extraInitializers), __runInitializers(this, _end1_initializers, void 0));
560
+ start2 = (__runInitializers(this, _end1_extraInitializers), __runInitializers(this, _start2_initializers, void 0));
561
+ end2 = (__runInitializers(this, _start2_extraInitializers), __runInitializers(this, _end2_initializers, void 0));
562
+ width = (__runInitializers(this, _end2_extraInitializers), __runInitializers(this, _width_initializers, void 0));
563
+ mode = (__runInitializers(this, _width_extraInitializers), __runInitializers(this, _mode_initializers, void 0));
564
+ constructor(properties) {
565
+ __runInitializers(this, _mode_extraInitializers);
566
+ this.id = properties.id || uuid();
567
+ this.hash = properties.hash;
568
+ this.timestamp = properties.timestamp;
569
+ this.start1 = properties.start1;
570
+ this.end1 = properties.end1;
571
+ this.start2 = properties.start2;
572
+ this.end2 = properties.end2;
573
+ this.width = properties.width;
574
+ this.mode = properties.mode;
575
+ }
576
+ };
577
+ })();
468
578
  const indexPrefilled = await setup({ schema: ReplicationRangeIndexableU32 }, createIndicies, type);
469
579
  let docCount = 10e4; // This is very small, so we expect that the ops will be very fast (i.e a few amount to join)
470
580
  for (let i = 0; i < docCount; i++) {