File: test_mprofile.py

package info (click to toggle)
python-memory-profiler 0.41%2Bgit20161018-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 280 kB
  • ctags: 163
  • sloc: python: 1,469; makefile: 24
file content (21 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""This script is intended as a test case for mprofile"""

import time

@profile
def test1(l):
    a = [1] * l
    time.sleep(1)
    return a

@profile
def test2(l):
    b = [1] * l
    time.sleep(1)
    return b

if __name__ == "__main__":
    l = 100000
    test1(l)
    test2(2 * l)