Skip to content

use line_profiler from pypi.org #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import pyprofilers as pp


### Profile with [cProfile](https://docs.python.org/3/library/profile.html#module-cProfile)
Use the standard Python [cProfile](https://docs.python.org/3/library/profile.html#module-cProfile) to list
Use the standard Python [cProfile](https://docs.python.org/3/library/profile.html#module-cProfile) to list
the cumulative time spent in the function `func` and all its subfunctions:

```python
Expand All @@ -29,10 +29,9 @@ def func():
- `sort_by` can be used to sort the results according to the supplied criteria. All criterias can be found [here.](https://docs.python.org/2/library/profile.html#pstats.Stats.sort_stats)
- `out_lines` controls the number of lines in results. Use `None` or ommit the arugment to show all.

### Profile with [line_profiler](https://github.com/rkern/line_profiler)
> :warning: **NOTE:** The `line_profiler` pip intallation does currently not work! Therefore pyprofilers will install a fork of `line_profiler`
### Profile with [line_profiler](https://github.com/pyutils/line_profiler)

Use the [line_profiler](https://github.com/rkern/line_profiler) to list time spent within each line of `func`:
Use the [line_profiler](https://github.com/pyutils/line_profiler) to list time spent within each line of `func`:

```python
@pp.profile_by_line(exit=1)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
packages=["pyprofilers"],
install_requires=[
"cython",
"line_profiler @ git+https://github.com/andreasfelix/line_profiler@pyproject",
"line_profiler",
"yappi",
],
python_requires=">=3.6",
Expand Down