File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11PYTHON ?= python
2+ PY_34 ?= $(shell ! python -c \
3+ 'import sys; print((3, 4) < sys.version_info)')
24
3- .PHONY : test
5+ .PHONY : test develop
46
57test :
68 $(PYTHON ) -m memory_profiler test/test_func.py
1820 $(PYTHON ) test/test_exception.py
1921 $(PYTHON ) test/test_exit_code.py
2022 $(PYTHON ) test/test_mprof.py
23+ if [ $( PY_34) = True ]; then \
24+ $(PYTHON ) test/test_aio_34.py; \
25+ fi
2126
2227develop :
2328 pip install -e .
Original file line number Diff line number Diff line change 1+ import asyncio
2+
3+ from memory_profiler import profile
4+
5+
6+ @profile
7+ @asyncio .coroutine
8+ def my_func ():
9+ a = [1 ] * (10 ** 6 )
10+ b = [2 ] * (2 * 10 ** 7 )
11+ print ('kek' )
12+ yield from asyncio .sleep (1e-2 )
13+ del b
14+
15+
16+ if __name__ == '__main__' :
17+ loop = asyncio .get_event_loop ()
18+ loop .run_until_complete (my_func ())
You can’t perform that action at this time.
0 commit comments