MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / setUp

Method setUp

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

Source from the content-addressed store, hash-verified

657
658class TestJsonMultiExport(PerformanceTest, unittest.TestCase):
659 def setUp(self):
660 super().setUp()
661 self.client = client_context.client
662 self.client.drop_database("perftest")
663 self.client.perfest.corpus.create_index("file")
664
665 ldjson_path = os.path.join(TEST_PATH, os.path.join("parallel", "ldjson_multi"))
666 self.files = [os.path.join(ldjson_path, s) for s in os.listdir(ldjson_path)]
667 self.data_size = sum(os.path.getsize(fname) for fname in self.files)
668
669 self.mp_map(insert_json_file_with_file_id, self.files)
670
671 def do_task(self):
672 self.mp_map(read_json_file, self.files)

Callers

nothing calls this directly

Calls 5

mp_mapMethod · 0.80
setUpMethod · 0.45
drop_databaseMethod · 0.45
create_indexMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected