lk-geimfari / mimesis

Mimesis is a robust data generator for Python that can produce a wide range of fake data in multiple languages.
https://mimesis.name
MIT License
4.39k stars 330 forks source link

pytest-benchmark integration? #338

Closed duckyou closed 6 years ago

duckyou commented 6 years ago

What about pytest-benchmark integration? It can be useful for optimization issues screenshot_2017-12-28_12-20-41 screenshot_2017-12-28_12-23-30

lk-geimfari commented 6 years ago

@duckyou It's can be useful I think. Let's add it!

duckyou commented 6 years ago

@lk-geimfari PR to master? Or you can create dev branch for features and after review merge it with master?

lk-geimfari commented 6 years ago

@duckyou Can you create a branch, please?

git checkout bench
git add --all
git commit -m "Added integration with pytest-benchmark"
duckyou commented 6 years ago

@lk-geimfari https://github.com/duckyou/mimesis/tree/dev-performance

lk-geimfari commented 6 years ago

@duckyou Can you tell me, please, what is your operating system? I have some problem with tox on Ubuntu 16.04 when tox tries to run tests on Python 3.6: tox_report.txt.

P.S All necessary versions of Python interpreters already installed on the system.

duckyou commented 6 years ago

@lk-geimfari Here it is:

$ uname -osrv
Linux 4.9.73-1-MANJARO #1 SMP PREEMPT Fri Dec 29 17:58:25 UTC 2017 GNU/Linux

I understand your problem. psutil cant compile without python-dev libs. Have you installed python3.6-dev? Here is full script which should work on Ubuntu/Xenial:

# Add python3.6 repo
#
sudo add-apt-repository -y ppa:jonathonf/python-3.6
sudo apt-get update

# Install tools
#
sudo apt-get -y install build-essential virtualenv git \
    python3-dev python3.6 python3.6-dev

# Setting up enviroment
#
git clone https://github.com/lk-geimfari/mimesis
cd mimesis/
virtualenv --python=python3.5 venv
source venv/bin/activate
pip install -r dev_requirements.txt
tox

screenshot_2018-01-06_11-01-56