mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-22 09:36:48 +03:00
Modify performance test
This commit is contained in:
parent
ea8c48f1aa
commit
a79df278b5
|
@ -74,7 +74,7 @@ class Tester(object):
|
||||||
# for x in xrange(int(5000000 * self.duration_factor)):
|
# for x in xrange(int(5000000 * self.duration_factor)):
|
||||||
# test_factory(1, 2, 3)
|
# test_factory(1, 2, 3)
|
||||||
|
|
||||||
def test_3_kw_injections(self, providers):
|
def test_instance_3_kw_injections(self, providers):
|
||||||
"""Test 3 keyword argument injections."""
|
"""Test 3 keyword argument injections."""
|
||||||
class A(object):
|
class A(object):
|
||||||
pass
|
pass
|
||||||
|
@ -92,7 +92,7 @@ class Tester(object):
|
||||||
for x in xrange(int(5000000 * self.duration_factor)):
|
for x in xrange(int(5000000 * self.duration_factor)):
|
||||||
Test(a=A(), b=B(), c=C())
|
Test(a=A(), b=B(), c=C())
|
||||||
|
|
||||||
def test_factory_3_factory_kw_injections(self, providers):
|
def test_instance_factory_3_factory_kw_injections(self, providers):
|
||||||
"""Test factory with 3 keyword argument injections via factories."""
|
"""Test factory with 3 keyword argument injections via factories."""
|
||||||
class A(object):
|
class A(object):
|
||||||
pass
|
pass
|
||||||
|
@ -173,5 +173,5 @@ if __name__ == '__main__':
|
||||||
provider_modules=[
|
provider_modules=[
|
||||||
dependency_injector.providers,
|
dependency_injector.providers,
|
||||||
],
|
],
|
||||||
duration_factor=1)
|
duration_factor=0.5)
|
||||||
tester.run()
|
tester.run()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user