tmark


Nametmark JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/OnisOris/tmark
SummaryTime marking package in code.
upload_time2024-09-07 21:20:21
maintainerNone
docs_urlNone
authorOnisOris
requires_python>=3.10
licenseNone
keywords time marks plot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Description
This module is designed for setting time stamps in code, convenient to use in cycles.

# Installing
```Shell
pip install tmark
```

or

```Shell
pip install git+https://github.com/OnisOris/tmark
```

# Example

```python
import tmark as tm
import time

tracker = tm.LatencyTracker()

# Simulation of a cycle with multiple tags in one iteration
for i in range(12):
    tracker.start("operation_1")
    time.sleep(0.1 + i * 0.02)  # Simulation of first operation
    tracker.stop("operation_1")

    tracker.start("operation_2")
    time.sleep(0.2 + i * 0.03)  # Simulation of the second operation
    tracker.stop("operation_2")

    tracker.start("operation_3")
    time.sleep(0.15 + i * 0.01)  # Simulation of the third operation
    tracker.stop("operation_3")

# Graph from object data
tracker.plot(statistic=True)

# Save to csv file
tracker.save_to_csv()

# Reading from csv file and plotting
tracker.plot_from_csv()
```

![Graphic](https://github.com/OnisOris/tmark/blob/main/img.png)

# Possible errors
/.../.venv/lib/python3.10/site-packages/tmark/latency_tracker.py:88: UserWarning: FigureCanvasAgg is non-interactive,
and thus cannot be shown plt.show()

## Solution:

pip install PyQt6

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OnisOris/tmark",
    "name": "tmark",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "time marks plot",
    "author": "OnisOris",
    "author_email": "onisoris@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/20/4e/6226ede8cc958670108b528adf3822f2cccfa40d798c63a99b25e51b5b3c/tmark-0.0.3.tar.gz",
    "platform": null,
    "description": "# Description\r\nThis module is designed for setting time stamps in code, convenient to use in cycles.\r\n\r\n# Installing\r\n```Shell\r\npip install tmark\r\n```\r\n\r\nor\r\n\r\n```Shell\r\npip install git+https://github.com/OnisOris/tmark\r\n```\r\n\r\n# Example\r\n\r\n```python\r\nimport tmark as tm\r\nimport time\r\n\r\ntracker = tm.LatencyTracker()\r\n\r\n# Simulation of a cycle with multiple tags in one iteration\r\nfor i in range(12):\r\n    tracker.start(\"operation_1\")\r\n    time.sleep(0.1 + i * 0.02)  # Simulation of first operation\r\n    tracker.stop(\"operation_1\")\r\n\r\n    tracker.start(\"operation_2\")\r\n    time.sleep(0.2 + i * 0.03)  # Simulation of the second operation\r\n    tracker.stop(\"operation_2\")\r\n\r\n    tracker.start(\"operation_3\")\r\n    time.sleep(0.15 + i * 0.01)  # Simulation of the third operation\r\n    tracker.stop(\"operation_3\")\r\n\r\n# Graph from object data\r\ntracker.plot(statistic=True)\r\n\r\n# Save to csv file\r\ntracker.save_to_csv()\r\n\r\n# Reading from csv file and plotting\r\ntracker.plot_from_csv()\r\n```\r\n\r\n![Graphic](https://github.com/OnisOris/tmark/blob/main/img.png)\r\n\r\n# Possible errors\r\n/.../.venv/lib/python3.10/site-packages/tmark/latency_tracker.py:88: UserWarning: FigureCanvasAgg is non-interactive,\r\nand thus cannot be shown plt.show()\r\n\r\n## Solution:\r\n\r\npip install PyQt6\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Time marking package in code.",
    "version": "0.0.3",
    "project_urls": {
        "GitHub": "https://github.com/OnisOris/tmark",
        "Homepage": "https://github.com/OnisOris/tmark"
    },
    "split_keywords": [
        "time",
        "marks",
        "plot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0231f1066d6b4d78c1637759e4a817403dbc6ee532e80386c30a07f8e6ebe508",
                "md5": "6a5cf61b3210b3d08fc16442a2a48bab",
                "sha256": "341289162eb8dce3af5889e64a819629f510710502fba8573d98ff7889c7f0e4"
            },
            "downloads": -1,
            "filename": "tmark-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a5cf61b3210b3d08fc16442a2a48bab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10608,
            "upload_time": "2024-09-07T21:20:19",
            "upload_time_iso_8601": "2024-09-07T21:20:19.796317Z",
            "url": "https://files.pythonhosted.org/packages/02/31/f1066d6b4d78c1637759e4a817403dbc6ee532e80386c30a07f8e6ebe508/tmark-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "204e6226ede8cc958670108b528adf3822f2cccfa40d798c63a99b25e51b5b3c",
                "md5": "40a071a6ab0e0dc6b21087c1b7995c28",
                "sha256": "8ce0e026443918f30bf54af214e7edd6250b3b51bbd6639ac50300e97b50e1f1"
            },
            "downloads": -1,
            "filename": "tmark-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "40a071a6ab0e0dc6b21087c1b7995c28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10346,
            "upload_time": "2024-09-07T21:20:21",
            "upload_time_iso_8601": "2024-09-07T21:20:21.172864Z",
            "url": "https://files.pythonhosted.org/packages/20/4e/6226ede8cc958670108b528adf3822f2cccfa40d798c63a99b25e51b5b3c/tmark-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-07 21:20:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OnisOris",
    "github_project": "tmark",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tmark"
}
        
Elapsed time: 0.69697s