summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-vprof.spec505
-rw-r--r--sources1
3 files changed, 507 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..bf70d9b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/vprof-0.38.tar.gz
diff --git a/python-vprof.spec b/python-vprof.spec
new file mode 100644
index 0000000..7b6ea2d
--- /dev/null
+++ b/python-vprof.spec
@@ -0,0 +1,505 @@
+%global _empty_manifest_terminate_build 0
+Name: python-vprof
+Version: 0.38
+Release: 1
+Summary: Visual profiler for Python
+License: BSD
+URL: http://github.com/nvdv/vprof
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ee/3e/80bebf83110f1919a876efca66d0812fde9905e926c740bb75382f2ac626/vprof-0.38.tar.gz
+BuildArch: noarch
+
+Requires: python3-psutil
+
+%description
+[![PyPI](https://img.shields.io/pypi/v/vprof.svg)](https://pypi.python.org/pypi/vprof/)
+
+# vprof
+
+vprof is a Python package providing rich and interactive visualizations for
+various Python program characteristics such as running time and memory usage.
+It supports Python 3.4+ and distributed under BSD license.
+
+The project is in active development and some of its features might not work as
+expected.
+
+## Screenshots
+![vprof-gif](http://i.imgur.com/ikBlfvQ.gif)
+
+## Contributing
+All contributions are highly encouraged! You can add new features,
+report and fix existing bugs and write docs and tutorials.
+Feel free to open an issue or send a pull request!
+
+## Prerequisites
+Dependencies to build `vprof` from source code:
+ * Python 3.4+
+ * `pip`
+ * `npm` >= 3.3.12
+
+`npm` is required to build `vprof` from sources only.
+
+## Dependencies
+All Python and `npm` module dependencies are listed in `package.json` and
+`requirements.txt`.
+
+## Installation
+`vprof` can be installed from PyPI
+
+```sh
+pip install vprof
+```
+
+To build `vprof` from sources, clone this repository and execute
+
+```sh
+python3 setup.py deps_install && python3 setup.py build_ui && python3 setup.py install
+```
+
+To install just `vprof` dependencies, run
+
+```sh
+python3 setup.py deps_install
+```
+
+## Usage
+
+```sh
+vprof -c <config> <src>
+```
+`<config>` is a combination of supported modes:
+
+* `c` - CPU flame graph ⚠️ **Not available for windows [#62](https://github.com/nvdv/vprof/issues/62)**
+
+Shows CPU flame graph for `<src>`.
+
+* `p` - profiler
+
+Runs built-in Python profiler on `<src>` and displays results.
+
+* `m` - memory graph
+
+Shows objects that are tracked by CPython GC and left in memory after code
+execution. Also shows process memory usage after execution of each line of `<src>`.
+
+* `h` - code heatmap
+
+Displays all executed code of `<src>` with line run times and execution counts.
+
+`<src>` can be Python source file (e.g. `testscript.py`) or path to package
+(e.g. `myproject/test_package`).
+
+To run scripts with arguments use double quotes
+
+```sh
+vprof -c cmh "testscript.py --foo --bar"
+```
+
+Modes can be combined
+
+```sh
+vprof -c cm testscript.py
+```
+
+`vprof` can also profile functions. In order to do this,
+launch `vprof` in remote mode:
+
+```sh
+vprof -r
+```
+
+`vprof` will open new tab in default web browser and then wait for stats.
+
+To profile a function run
+
+```python
+from vprof import runner
+
+def foo(arg1, arg2):
+ ...
+
+runner.run(foo, 'cmhp', args=(arg1, arg2), host='localhost', port=8000)
+```
+
+where `cmhp` is profiling mode, `host` and `port` are hostname and port of
+`vprof` server launched in remote mode. Obtained stats will be rendered in new
+tab of default web browser, opened by `vprof -r` command.
+
+`vprof` can save profile stats to file and render visualizations from
+previously saved file.
+
+```sh
+vprof -c cmh src.py --output-file profile.json
+```
+
+writes profile to file and
+
+```sh
+vprof --input-file profile.json
+```
+renders visualizations from previously saved file.
+
+Check `vprof -h` for full list of supported parameters.
+
+To show UI help, press `h` when visualizations are displayed.
+
+Also you can check `examples` directory for more profiling examples.
+
+## Testing
+
+```sh
+python3 setup.py test_python && python3 setup.py test_javascript && python3 setup.py e2e_test
+```
+
+## License
+
+BSD
+
+
+
+
+%package -n python3-vprof
+Summary: Visual profiler for Python
+Provides: python-vprof
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-vprof
+[![PyPI](https://img.shields.io/pypi/v/vprof.svg)](https://pypi.python.org/pypi/vprof/)
+
+# vprof
+
+vprof is a Python package providing rich and interactive visualizations for
+various Python program characteristics such as running time and memory usage.
+It supports Python 3.4+ and distributed under BSD license.
+
+The project is in active development and some of its features might not work as
+expected.
+
+## Screenshots
+![vprof-gif](http://i.imgur.com/ikBlfvQ.gif)
+
+## Contributing
+All contributions are highly encouraged! You can add new features,
+report and fix existing bugs and write docs and tutorials.
+Feel free to open an issue or send a pull request!
+
+## Prerequisites
+Dependencies to build `vprof` from source code:
+ * Python 3.4+
+ * `pip`
+ * `npm` >= 3.3.12
+
+`npm` is required to build `vprof` from sources only.
+
+## Dependencies
+All Python and `npm` module dependencies are listed in `package.json` and
+`requirements.txt`.
+
+## Installation
+`vprof` can be installed from PyPI
+
+```sh
+pip install vprof
+```
+
+To build `vprof` from sources, clone this repository and execute
+
+```sh
+python3 setup.py deps_install && python3 setup.py build_ui && python3 setup.py install
+```
+
+To install just `vprof` dependencies, run
+
+```sh
+python3 setup.py deps_install
+```
+
+## Usage
+
+```sh
+vprof -c <config> <src>
+```
+`<config>` is a combination of supported modes:
+
+* `c` - CPU flame graph ⚠️ **Not available for windows [#62](https://github.com/nvdv/vprof/issues/62)**
+
+Shows CPU flame graph for `<src>`.
+
+* `p` - profiler
+
+Runs built-in Python profiler on `<src>` and displays results.
+
+* `m` - memory graph
+
+Shows objects that are tracked by CPython GC and left in memory after code
+execution. Also shows process memory usage after execution of each line of `<src>`.
+
+* `h` - code heatmap
+
+Displays all executed code of `<src>` with line run times and execution counts.
+
+`<src>` can be Python source file (e.g. `testscript.py`) or path to package
+(e.g. `myproject/test_package`).
+
+To run scripts with arguments use double quotes
+
+```sh
+vprof -c cmh "testscript.py --foo --bar"
+```
+
+Modes can be combined
+
+```sh
+vprof -c cm testscript.py
+```
+
+`vprof` can also profile functions. In order to do this,
+launch `vprof` in remote mode:
+
+```sh
+vprof -r
+```
+
+`vprof` will open new tab in default web browser and then wait for stats.
+
+To profile a function run
+
+```python
+from vprof import runner
+
+def foo(arg1, arg2):
+ ...
+
+runner.run(foo, 'cmhp', args=(arg1, arg2), host='localhost', port=8000)
+```
+
+where `cmhp` is profiling mode, `host` and `port` are hostname and port of
+`vprof` server launched in remote mode. Obtained stats will be rendered in new
+tab of default web browser, opened by `vprof -r` command.
+
+`vprof` can save profile stats to file and render visualizations from
+previously saved file.
+
+```sh
+vprof -c cmh src.py --output-file profile.json
+```
+
+writes profile to file and
+
+```sh
+vprof --input-file profile.json
+```
+renders visualizations from previously saved file.
+
+Check `vprof -h` for full list of supported parameters.
+
+To show UI help, press `h` when visualizations are displayed.
+
+Also you can check `examples` directory for more profiling examples.
+
+## Testing
+
+```sh
+python3 setup.py test_python && python3 setup.py test_javascript && python3 setup.py e2e_test
+```
+
+## License
+
+BSD
+
+
+
+
+%package help
+Summary: Development documents and examples for vprof
+Provides: python3-vprof-doc
+%description help
+[![PyPI](https://img.shields.io/pypi/v/vprof.svg)](https://pypi.python.org/pypi/vprof/)
+
+# vprof
+
+vprof is a Python package providing rich and interactive visualizations for
+various Python program characteristics such as running time and memory usage.
+It supports Python 3.4+ and distributed under BSD license.
+
+The project is in active development and some of its features might not work as
+expected.
+
+## Screenshots
+![vprof-gif](http://i.imgur.com/ikBlfvQ.gif)
+
+## Contributing
+All contributions are highly encouraged! You can add new features,
+report and fix existing bugs and write docs and tutorials.
+Feel free to open an issue or send a pull request!
+
+## Prerequisites
+Dependencies to build `vprof` from source code:
+ * Python 3.4+
+ * `pip`
+ * `npm` >= 3.3.12
+
+`npm` is required to build `vprof` from sources only.
+
+## Dependencies
+All Python and `npm` module dependencies are listed in `package.json` and
+`requirements.txt`.
+
+## Installation
+`vprof` can be installed from PyPI
+
+```sh
+pip install vprof
+```
+
+To build `vprof` from sources, clone this repository and execute
+
+```sh
+python3 setup.py deps_install && python3 setup.py build_ui && python3 setup.py install
+```
+
+To install just `vprof` dependencies, run
+
+```sh
+python3 setup.py deps_install
+```
+
+## Usage
+
+```sh
+vprof -c <config> <src>
+```
+`<config>` is a combination of supported modes:
+
+* `c` - CPU flame graph ⚠️ **Not available for windows [#62](https://github.com/nvdv/vprof/issues/62)**
+
+Shows CPU flame graph for `<src>`.
+
+* `p` - profiler
+
+Runs built-in Python profiler on `<src>` and displays results.
+
+* `m` - memory graph
+
+Shows objects that are tracked by CPython GC and left in memory after code
+execution. Also shows process memory usage after execution of each line of `<src>`.
+
+* `h` - code heatmap
+
+Displays all executed code of `<src>` with line run times and execution counts.
+
+`<src>` can be Python source file (e.g. `testscript.py`) or path to package
+(e.g. `myproject/test_package`).
+
+To run scripts with arguments use double quotes
+
+```sh
+vprof -c cmh "testscript.py --foo --bar"
+```
+
+Modes can be combined
+
+```sh
+vprof -c cm testscript.py
+```
+
+`vprof` can also profile functions. In order to do this,
+launch `vprof` in remote mode:
+
+```sh
+vprof -r
+```
+
+`vprof` will open new tab in default web browser and then wait for stats.
+
+To profile a function run
+
+```python
+from vprof import runner
+
+def foo(arg1, arg2):
+ ...
+
+runner.run(foo, 'cmhp', args=(arg1, arg2), host='localhost', port=8000)
+```
+
+where `cmhp` is profiling mode, `host` and `port` are hostname and port of
+`vprof` server launched in remote mode. Obtained stats will be rendered in new
+tab of default web browser, opened by `vprof -r` command.
+
+`vprof` can save profile stats to file and render visualizations from
+previously saved file.
+
+```sh
+vprof -c cmh src.py --output-file profile.json
+```
+
+writes profile to file and
+
+```sh
+vprof --input-file profile.json
+```
+renders visualizations from previously saved file.
+
+Check `vprof -h` for full list of supported parameters.
+
+To show UI help, press `h` when visualizations are displayed.
+
+Also you can check `examples` directory for more profiling examples.
+
+## Testing
+
+```sh
+python3 setup.py test_python && python3 setup.py test_javascript && python3 setup.py e2e_test
+```
+
+## License
+
+BSD
+
+
+
+
+%prep
+%autosetup -n vprof-0.38
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-vprof -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.38-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..1047a83
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+16a705c332b417252305ba7422997138 vprof-0.38.tar.gz