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

Method before

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

Source from the content-addressed store, hash-verified

686 self.data_size = sum(os.path.getsize(fname) for fname in self.files)
687
688 def before(self):
689 self.client.perftest.drop_collection("fs.files")
690 self.client.perftest.drop_collection("fs.chunks")
691
692 self.bucket = GridFSBucket(self.client.perftest)
693 gridfs_path = os.path.join(TEST_PATH, os.path.join("parallel", "gridfs_multi"))
694 self.files = [os.path.join(gridfs_path, s) for s in os.listdir(gridfs_path)]
695
696 def do_task(self):
697 self.mp_map(insert_gridfs_file, self.files)

Callers

nothing calls this directly

Calls 3

GridFSBucketClass · 0.90
drop_collectionMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected