File: imports.py

package info (click to toggle)
python-pyperform 1.86-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 168 kB
  • sloc: python: 729; makefile: 17
file content (25 lines) | stat: -rw-r--r-- 441 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
__author__ = 'calvin'


from pyperform import *


@ComparisonBenchmark('imports', timeit_repeat=10)
def import_top_level():
    import os
    import datetime
    import collections
    import json


@ComparisonBenchmark('imports', timeit_repeat=10)
def import_lower_level():
    from os import path
    from datetime import datetime
    from collections import deque
    from json import decoder




ComparisonBenchmark.summarize('imports')