Home
last modified time | relevance | path

Searched refs:timeit (Results 1 – 25 of 39) sorted by relevance

12

/third_party/python/Lib/test/
Dtest_timeit.py1 import timeit
28 timeit._fake_timer = self
48 del timeit._fake_timer
53 self.assertEqual(timeit.reindent("", 0), "")
54 self.assertEqual(timeit.reindent("", 4), "")
57 self.assertEqual(timeit.reindent("pass", 0), "pass")
58 self.assertEqual(timeit.reindent("pass", 4), "pass")
61 self.assertEqual(timeit.reindent("\n\n", 0), "\n\n")
62 self.assertEqual(timeit.reindent("\n\n", 4), "\n \n ")
65 self.assertEqual(timeit.reindent(
[all …]
/third_party/python/Doc/library/
Dtimeit.rst1 :mod:`timeit` --- Measure execution time of small code snippets
4 .. module:: timeit
7 **Source code:** :source:`Lib/timeit.py`
16 a :ref:`timeit-command-line-interface` as well as a :ref:`callable <python-interface>`
25 The following example shows how the :ref:`timeit-command-line-interface`
30 $ python3 -m timeit '"-".join(str(n) for n in range(100))'
32 $ python3 -m timeit '"-".join([str(n) for n in range(100)])'
34 $ python3 -m timeit '"-".join(map(str, range(100)))'
39 >>> import timeit
40 >>> timeit.timeit('"-".join(str(n) for n in range(100))', number=10000)
[all …]
Ddebug.rst19 timeit.rst
/third_party/boost/libs/histogram/benchmark/
Dhistogram_filling_numpy.py5 import timeit
10 print(timeit.timeit("np.histogram(x, bins=100, range=(0, 1))",
13 print(timeit.timeit("histogram1d(x, bins=100, range=(0, 1))",
/third_party/gn/build/
Dfull_test.py10 import timeit
70 time_a = timeit.timeit('Trial("%s")' % in_chrome_tree_gn, number=TRIALS,
72 time_b = timeit.timeit('Trial("%s")' % our_gn, number=TRIALS,
/third_party/protobuf/benchmarks/python/
Dpy_benchmark.py4 import timeit
128 return timeit.timeit(stmt="%s(%s)" % (self.test_method, test_method_args),
138 t = timeit.timeit(stmt="%s(%s)" % (self.test_method, test_method_args),
/third_party/python/Lib/
Dtimeit.py164 def timeit(self, number=default_number): member in Timer
206 t = self.timeit(number)
224 time_taken = self.timeit(number)
231 def timeit(stmt="pass", setup="pass", timer=default_timer, function
234 return Timer(stmt, setup, timer, globals).timeit(number)
/third_party/python/Tools/importbench/
Dimportbench.py17 import timeit
24 timer = timeit.Timer(stmt)
30 total_time += timer.timeit(1)
/third_party/vulkan-headers/registry/
Dgenvk.py35 def startTimer(timeit): argument
37 if timeit:
41 def endTimer(timeit, msg): argument
43 if timeit:
/third_party/openGLES/xml/
Dgenheaders.py22 timeit = False variable
37 if (timeit):
531 timeit = True variable
Dgenglvnd.py22 timeit = False variable
52 timeit = True variable
71 if (timeit):
/third_party/skia/third_party/externals/egl-registry/api/
Dgenheaders.py33 timeit = False variable
63 timeit = True variable
82 if (timeit):
/third_party/skia/third_party/externals/opengl-registry/xml/
Dgenheaders.py33 timeit = False variable
63 timeit = True variable
82 if (timeit):
Dgenglvnd.py33 timeit = False variable
63 timeit = True variable
82 if (timeit):
/third_party/EGL/api/
Dgenheaders.py22 timeit = False variable
38 if (timeit):
573 timeit = True variable
/third_party/python/Doc/tutorial/
Dstdlib.rst260 instead of the traditional approach to swapping arguments. The :mod:`timeit`
263 >>> from timeit import Timer
264 >>> Timer('t=a; a=b; b=t', 'a=1; b=2').timeit()
266 >>> Timer('a,b = b,a', 'a=1; b=2').timeit()
269 In contrast to :mod:`timeit`'s fine level of granularity, the :mod:`profile` and
/third_party/python/Misc/NEWS.d/
D3.5.0b2.rst75 Fixed timeit when the statement is a string and the setup is not.
D3.5.0b4.rst170 Fixed regression in the timeit module with multiline setup.
D3.5.0a3.rst374 Allow selection of output units in timeit. Patch by Julian Gindi.
/third_party/python/Tools/stringbench/
Dstringbench.py5 import timeit
1397 class BenchTimer(timeit.Timer):
1401 x = self.timeit(number)
1406 times.append(self.timeit(number))
DREADME57 The times are computed with 'timeit.py' which repeats the test more
/third_party/flatbuffers/tests/
Dpy_test.py25 import timeit
2317 duration = timeit.timeit(stmt=f, number=count)
2335 duration = timeit.timeit(stmt=f, number=count)
2351 duration = timeit.timeit(stmt=make_monster_from_generated_code,
/third_party/pcre2/pcre2/src/
Dpcre2test.c925 static int timeit = 0; variable
5478 if (timeit > 0) prmsg(&msg, "timing"); in process_pattern()
5799 if (timeit > 0) in process_pattern()
5803 for (i = 0; i < timeit; i++) in process_pattern()
5815 (((double)time_taken * 1000.0) / (double)timeit) / in process_pattern()
5830 if (timeit > 0) in process_pattern()
5835 for (i = 0; i < timeit; i++) in process_pattern()
5848 (((double)time_taken * 1000.0) / (double)timeit) / in process_pattern()
8775 if (both) timeit = timeitm; in main()
9138 if (timeit > 0) in main()
[all …]
/third_party/python/Tools/scripts/
Dvar_access_benchmark.py273 from timeit import Timer
/third_party/python/Doc/using/
Dcmdline.rst110 as a script. An example is the :mod:`timeit` module::
112 python -m timeit -s 'setup here' 'benchmarked code here'
113 python -m timeit -h # for details

12