MonkeyScope


NameMonkeyScope JSON
Version 1.6.0 PyPI version JSON
download
home_pagehttps://github.com/BrokenShell/MonkeyScope
SummaryDistributions & Timer for Non-deterministic Value Generators
upload_time2024-04-06 22:28:38
maintainerNone
docs_urlNone
authorRobert Sharp
requires_python>=3.7
licenseFree for non-commercial use
keywords monkeyscope distribution tests function timer performance testing statistical analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MonkeyScope
Distribution Tests & Performance Timer for Non-deterministic Functions

### Sister Project:
- Fortuna: Collection of abstractions to make custom random generators. https://pypi.org/project/Fortuna/


### Quick Install `$ pip install MonkeyScope`


### Installation may require the following:
- Python 3.7 or later with dev tools (setuptools, pip, etc.)
- Cython: Bridge from C/C++ to Python.
- Modern C++ compiler and Standard Library. Clang or GCC.

---

## MonkeyScope Specifications
- `MonkeyScope.distribution_timer(func: staticmethod, *args, **kwargs) -> None`
    - Logger for the statistical analysis of non-deterministic generators.
    - @param func :: function, method or lambda to analyze. Evaluated as `func(*args, **kwargs)`
    - @optional_kw num_cycles=10000 :: Total number of samples to use for analysis.
    - @optional_kw post_processor=None staticmethod :: Used to scale a large set of data into a smaller set of groupings for better visualization of the data, esp. useful for distributions of floats. For many functions in quick_test(), math.floor() is used, for others round() is more appropriate. For more complex post processing - lambdas work nicely. Post processing only affects the distribution, the statistics and performance results are unaffected.
- `MonkeyScope.distribution(func: staticmethod, *args, **kwargs) -> None`
    - Stats and distribution.
- `MonkeyScope.timer(func: staticmethod, *args, **kwargs) -> None`
    - Just the function timer.

### MonkeyScope Script Example
```python
import MonkeyScope, random


x, y, z = 1, 10, 2
MonkeyScope.distribution_timer(random.randint, x, y)
MonkeyScope.distribution_timer(random.randrange, x, y)
MonkeyScope.distribution_timer(random.randrange, x, y, z)
```

### Typical Script Output
```
Output Analysis: Random.randint(1, 10)
Typical Timing: 1270 ± 88 ns
Statistics of 1000 samples:
 Minimum: 1
 Median: 5.0
 Maximum: 10
 Mean: 5.425
 Std Deviation: 2.867468395641005
Distribution of 100000 samples:
 1: 10.0%
 2: 10.073%
 3: 10.046%
 4: 10.07%
 5: 10.032%
 6: 9.991%
 7: 9.978%
 8: 10.115%
 9: 9.836%
 10: 9.859%

Output Analysis: Random.randrange(1, 10)
Typical Timing: 1135 ± 69 ns
Statistics of 1000 samples:
 Minimum: 1
 Median: 5.0
 Maximum: 9
 Mean: 5.028
 Std Deviation: 2.605228588819031
Distribution of 100000 samples:
 1: 11.281%
 2: 11.098%
 3: 11.04%
 4: 11.119%
 5: 10.999%
 6: 11.176%
 7: 11.206%
 8: 11.091%
 9: 10.99%

Output Analysis: Random.randrange(1, 10, 2)
Typical Timing: 1332 ± 55 ns
Statistics of 1000 samples:
 Minimum: 1
 Median: 5.0
 Maximum: 9
 Mean: 5.068
 Std Deviation: 2.771890329720857
Distribution of 100000 samples:
 1: 19.868%
 3: 20.025%
 5: 20.001%
 7: 19.811%
 9: 20.295%
```


### Development Log:
##### MonkeyScope 1.4.4
- Resolves bug caused by attempting to generate a distribution of non-numeric values.

##### MonkeyScope 1.4.3
- Updates calling signature of `distribution` and `distribution_timer`

##### MonkeyScope 1.3.4
- Adds toml file to aid installation

##### MonkeyScope 1.3.3
- Documentation Update

##### MonkeyScope 1.3.2
- MonkeyScope no longer requires C++17 compiler. Any C++ compiler should work.

##### MonkeyScope 1.3.1
- Documentation Update
- Nano second precision enabled with time_ns

##### MonkeyScope 1.3.0
- No longer requires numpy
- Requires Python3.7 or later

##### MonkeyScope 1.2.8
- Internal Performance Update
- Final 3.6 release

##### MonkeyScope 1.2.7
- Docs update

##### MonkeyScope 1.2.6
- Installer Update, will properly install numpy as needed.

##### MonkeyScope 1.2.5
- Fixed Typos

##### MonkeyScope 1.2.4
- More minor typos fixed

##### MonkeyScope 1.2.3
- Minor typos fixed.

##### MonkeyScope 1.2.2
- MonkeyScope is now compatible with python notebooks.

##### MonkeyScope 1.2.1
- Documentation update

##### MonkeyScope 1.2.0
- Minor performance improvement.

##### MonkeyScope 1.1.5
- Public Release

##### MonkeyScope Beta 0.1.5
- Installer Update

##### MonkeyScope Beta 0.1.4
- Minor Bug Fix

##### MonkeyScope Beta 0.1.3
- Continued Development

##### MonkeyScope Beta 0.1.2
- Renamed to MonkeyScope

##### MonkeyTimer Beta 0.0.2
- Changed to c++ compiler

##### MonkeyTimer Beta 0.0.1
- Initial Project Setup

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/BrokenShell/MonkeyScope",
    "name": "MonkeyScope",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "MonkeyScope, distribution tests, function timer, performance testing, statistical analysis",
    "author": "Robert Sharp",
    "author_email": "webmaster@sharpdesigndigital.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/15/35e9d445eb9ab61aed3bfdf5416760196a8ef8b617ae473725fafea03baa/MonkeyScope-1.6.0.tar.gz",
    "platform": "Darwin",
    "description": "# MonkeyScope\nDistribution Tests & Performance Timer for Non-deterministic Functions\n\n### Sister Project:\n- Fortuna: Collection of abstractions to make custom random generators. https://pypi.org/project/Fortuna/\n\n\n### Quick Install `$ pip install MonkeyScope`\n\n\n### Installation may require the following:\n- Python 3.7 or later with dev tools (setuptools, pip, etc.)\n- Cython: Bridge from C/C++ to Python.\n- Modern C++ compiler and Standard Library. Clang or GCC.\n\n---\n\n## MonkeyScope Specifications\n- `MonkeyScope.distribution_timer(func: staticmethod, *args, **kwargs) -> None`\n    - Logger for the statistical analysis of non-deterministic generators.\n    - @param func :: function, method or lambda to analyze. Evaluated as `func(*args, **kwargs)`\n    - @optional_kw num_cycles=10000 :: Total number of samples to use for analysis.\n    - @optional_kw post_processor=None staticmethod :: Used to scale a large set of data into a smaller set of groupings for better visualization of the data, esp. useful for distributions of floats. For many functions in quick_test(), math.floor() is used, for others round() is more appropriate. For more complex post processing - lambdas work nicely. Post processing only affects the distribution, the statistics and performance results are unaffected.\n- `MonkeyScope.distribution(func: staticmethod, *args, **kwargs) -> None`\n    - Stats and distribution.\n- `MonkeyScope.timer(func: staticmethod, *args, **kwargs) -> None`\n    - Just the function timer.\n\n### MonkeyScope Script Example\n```python\nimport MonkeyScope, random\n\n\nx, y, z = 1, 10, 2\nMonkeyScope.distribution_timer(random.randint, x, y)\nMonkeyScope.distribution_timer(random.randrange, x, y)\nMonkeyScope.distribution_timer(random.randrange, x, y, z)\n```\n\n### Typical Script Output\n```\nOutput Analysis: Random.randint(1, 10)\nTypical Timing: 1270 \u00b1 88 ns\nStatistics of 1000 samples:\n Minimum: 1\n Median: 5.0\n Maximum: 10\n Mean: 5.425\n Std Deviation: 2.867468395641005\nDistribution of 100000 samples:\n 1: 10.0%\n 2: 10.073%\n 3: 10.046%\n 4: 10.07%\n 5: 10.032%\n 6: 9.991%\n 7: 9.978%\n 8: 10.115%\n 9: 9.836%\n 10: 9.859%\n\nOutput Analysis: Random.randrange(1, 10)\nTypical Timing: 1135 \u00b1 69 ns\nStatistics of 1000 samples:\n Minimum: 1\n Median: 5.0\n Maximum: 9\n Mean: 5.028\n Std Deviation: 2.605228588819031\nDistribution of 100000 samples:\n 1: 11.281%\n 2: 11.098%\n 3: 11.04%\n 4: 11.119%\n 5: 10.999%\n 6: 11.176%\n 7: 11.206%\n 8: 11.091%\n 9: 10.99%\n\nOutput Analysis: Random.randrange(1, 10, 2)\nTypical Timing: 1332 \u00b1 55 ns\nStatistics of 1000 samples:\n Minimum: 1\n Median: 5.0\n Maximum: 9\n Mean: 5.068\n Std Deviation: 2.771890329720857\nDistribution of 100000 samples:\n 1: 19.868%\n 3: 20.025%\n 5: 20.001%\n 7: 19.811%\n 9: 20.295%\n```\n\n\n### Development Log:\n##### MonkeyScope 1.4.4\n- Resolves bug caused by attempting to generate a distribution of non-numeric values.\n\n##### MonkeyScope 1.4.3\n- Updates calling signature of `distribution` and `distribution_timer`\n\n##### MonkeyScope 1.3.4\n- Adds toml file to aid installation\n\n##### MonkeyScope 1.3.3\n- Documentation Update\n\n##### MonkeyScope 1.3.2\n- MonkeyScope no longer requires C++17 compiler. Any C++ compiler should work.\n\n##### MonkeyScope 1.3.1\n- Documentation Update\n- Nano second precision enabled with time_ns\n\n##### MonkeyScope 1.3.0\n- No longer requires numpy\n- Requires Python3.7 or later\n\n##### MonkeyScope 1.2.8\n- Internal Performance Update\n- Final 3.6 release\n\n##### MonkeyScope 1.2.7\n- Docs update\n\n##### MonkeyScope 1.2.6\n- Installer Update, will properly install numpy as needed.\n\n##### MonkeyScope 1.2.5\n- Fixed Typos\n\n##### MonkeyScope 1.2.4\n- More minor typos fixed\n\n##### MonkeyScope 1.2.3\n- Minor typos fixed.\n\n##### MonkeyScope 1.2.2\n- MonkeyScope is now compatible with python notebooks.\n\n##### MonkeyScope 1.2.1\n- Documentation update\n\n##### MonkeyScope 1.2.0\n- Minor performance improvement.\n\n##### MonkeyScope 1.1.5\n- Public Release\n\n##### MonkeyScope Beta 0.1.5\n- Installer Update\n\n##### MonkeyScope Beta 0.1.4\n- Minor Bug Fix\n\n##### MonkeyScope Beta 0.1.3\n- Continued Development\n\n##### MonkeyScope Beta 0.1.2\n- Renamed to MonkeyScope\n\n##### MonkeyTimer Beta 0.0.2\n- Changed to c++ compiler\n\n##### MonkeyTimer Beta 0.0.1\n- Initial Project Setup\n",
    "bugtrack_url": null,
    "license": "Free for non-commercial use",
    "summary": "Distributions & Timer for Non-deterministic Value Generators",
    "version": "1.6.0",
    "project_urls": {
        "Homepage": "https://github.com/BrokenShell/MonkeyScope"
    },
    "split_keywords": [
        "monkeyscope",
        " distribution tests",
        " function timer",
        " performance testing",
        " statistical analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95b0cfd18ea1e445a5aa3884473882abc57a94224b472dd3edc6482ce4bff841",
                "md5": "524ea507092f2ec7131b5b6ddc7eec5d",
                "sha256": "59664632da4f6df68cf0e68caca473b5544e5dbea6fc10433e306f5330ce64c8"
            },
            "downloads": -1,
            "filename": "MonkeyScope-1.6.0-cp311-cp311-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "524ea507092f2ec7131b5b6ddc7eec5d",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.7",
            "size": 98971,
            "upload_time": "2024-04-06T22:28:36",
            "upload_time_iso_8601": "2024-04-06T22:28:36.442821Z",
            "url": "https://files.pythonhosted.org/packages/95/b0/cfd18ea1e445a5aa3884473882abc57a94224b472dd3edc6482ce4bff841/MonkeyScope-1.6.0-cp311-cp311-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d71535e9d445eb9ab61aed3bfdf5416760196a8ef8b617ae473725fafea03baa",
                "md5": "84de4d4971a42f0dd76cc109cc68991c",
                "sha256": "94623e51e858a36af8052b07de113d13bac356f30af683703d779311d630cb86"
            },
            "downloads": -1,
            "filename": "MonkeyScope-1.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "84de4d4971a42f0dd76cc109cc68991c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 85469,
            "upload_time": "2024-04-06T22:28:38",
            "upload_time_iso_8601": "2024-04-06T22:28:38.214293Z",
            "url": "https://files.pythonhosted.org/packages/d7/15/35e9d445eb9ab61aed3bfdf5416760196a8ef8b617ae473725fafea03baa/MonkeyScope-1.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-06 22:28:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "BrokenShell",
    "github_project": "MonkeyScope",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "monkeyscope"
}
        
Elapsed time: 0.41805s