MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / init_company

Function init_company

benchmarks/test_basic_doc_ops.py:90–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 Company.drop_collection()
89
90 def init_company():
91 return Company(
92 name="MongoDB, Inc.",
93 contacts=[
94 Contact(name="Contact %d" % x, title="CEO", address="Address %d" % x)
95 for x in range(1000)
96 ],
97 )
98
99 company = init_company()
100 print("Big doc to mongo: %.3fms" % (timeit(company.to_mongo, 100) * 10**3))

Callers 2

test_big_docFunction · 0.85

Calls 2

ContactClass · 0.85
CompanyClass · 0.70

Tested by

no test coverage detected