-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Giuseppe Lumia
committed
Nov 15, 2021
1 parent
e19ddcf
commit d1e7729
Showing
21 changed files
with
489 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "pylaprof" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
description = "A Python sampling profiler for AWS Lambda functions (and not only)." | ||
authors = ["Giuseppe Lumia <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -18,6 +18,7 @@ black = "^21.10b0" | |
isort = "^5.10.1" | ||
pytest = "^6.2.5" | ||
coverage = {version = "^6.1.2", extras = ["toml"]} | ||
freezegun = "^1.1.0" | ||
|
||
[tool.poetry.scripts] | ||
pylaprof-merge = "scripts.merge:main" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
import tempfile | ||
from unittest.mock import Mock | ||
|
||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def tmpcwd(): | ||
"""Run test in a temporary directory.""" | ||
cwd = os.getcwd() | ||
with tempfile.TemporaryDirectory(prefix="pylaprof-test") as tmpdir: | ||
os.chdir(tmpdir) | ||
yield | ||
os.chdir(cwd) | ||
|
||
|
||
@pytest.fixture | ||
def boto3_mock(monkeypatch): | ||
"""Monkeypatch pylaprof's boto3 module.""" | ||
mock = Mock() | ||
monkeypatch.setattr("pylaprof.boto3", mock) | ||
return mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<module> (/home/gius/pylaprof/tests/launcher.py:33);__enter__ (/home/gius/pylaprof/tests/pylaprof/__init__.py:210);start (/home/gius/pylaprof/tests/pylaprof/__init__.py:198);start (/usr/lib/python3.9/threading.py:897);wait (/usr/lib/python3.9/threading.py:574);wait (/usr/lib/python3.9/threading.py:312) 1 | ||
<module> (/home/gius/pylaprof/tests/launcher.py:34);main (/home/gius/pylaprof/tests/launcher.py:15);handler (/home/gius/pylaprof/tests/handler.py:8);sleepy_task (/home/gius/pylaprof/tests/handler.py:16) 290 | ||
<module> (/home/gius/pylaprof/tests/launcher.py:34);main (/home/gius/pylaprof/tests/launcher.py:15);handler (/home/gius/pylaprof/tests/handler.py:9);cpu_intens_task (/home/gius/pylaprof/tests/handler.py:22) 129 | ||
<module> (/home/gius/pylaprof/tests/launcher.py:34);main (/home/gius/pylaprof/tests/launcher.py:15);handler (/home/gius/pylaprof/tests/handler.py:9);cpu_intens_task (/home/gius/pylaprof/tests/handler.py:21) 33 | ||
<module> (/home/gius/pylaprof/tests/launcher.py:34);main (/home/gius/pylaprof/tests/launcher.py:15);handler (/home/gius/pylaprof/tests/handler.py:10);io_task (/home/gius/pylaprof/tests/handler.py:26);get (/home/gius/.local/lib/python3.9/site-packages/requests/api.py:76);request (/home/gius/.local/lib/python3.9/site-packages/requests/api.py:61);request (/home/gius/.local/lib/python3.9/site-packages/requests/sessions.py:542);send (/home/gius/.local/lib/python3.9/site-packages/requests/sessions.py:655);send (/home/gius/.local/lib/python3.9/site-packages/requests/adapters.py:439);urlopen (/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:699);_make_request (/usr/lib/python3.9/site-packages/urllib3/connectionpool.py:440);getresponse (/usr/lib/python3.9/http/client.py:1371);begin (/usr/lib/python3.9/http/client.py:319);_read_status (/usr/lib/python3.9/http/client.py:280);readinto (/usr/lib/python3.9/socket.py:704) 290 |
Oops, something went wrong.