MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / setUp

Method setUp

test/performance/perf_test.py:278–283  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

276# JSON MICRO-BENCHMARKS
277class JsonEncodingTest(MicroTest):
278 def setUp(self):
279 super().setUp()
280 # Location of test data.
281 self.document = json_util.loads(self.file_data)
282 # Note: use the BSON size as the data size so we can compare BSON vs JSON performance.
283 self.data_size = len(encode(self.document)) * NUM_DOCS
284
285 def do_task(self):
286 for _ in range(NUM_DOCS):

Callers

nothing calls this directly

Calls 2

encodeFunction · 0.90
setUpMethod · 0.45

Tested by

no test coverage detected