{ "info": { "author": "Chris O'Hara", "author_email": "cohara87@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "## Gauged\n\n[![tests][travis]][travis-builds]\n\nA fast, append-only storage layer for gauges, counters, timers and other numeric data types that change over time.\n\nFeatures:\n\n- Comfortably handle billions of data points on a single node.\n- Support for sparse data (unlike the fixed-size RRDtool).\n- Cache-oblivious data structures and algorithms for speed and memory-efficiency.\n- Efficient range queries and roll-ups of any size down to the configurable resolution of 1 second.\n- Use either **MySQL**, **PostgreSQL** or **SQLite** as a backend.\n- Runs on Mac, Linux & Windows\n\n## Installation\n\nThe library can be installed with **easy_install** or **pip**\n\n```bash\n$ pip install gauged\n```\n\nPython 2.7.x (CPython or PyPy) is required.\n\n## Example\n\nWriting\n\n```python\nfrom gauged import Gauged\n\ngauged = Gauged('mysql://root@localhost/gauged')\n\nwith gauged.writer as writer:\n writer.add({ 'requests': 1, 'response_time': 0.45, 'memory_usage': 145.6 })\n writer.add({ 'requests': 1, 'response_time': 0.25, 'cpu_usage': 148.3, 'api_requests': 3 })\n```\n\nReading\n\n```python\n# Count the total number of requests\nrequests = gauged.aggregate('requests', Gauged.SUM)\n\n# Count the number of requests between 2014/01/01 and 2014/01/08\nrequests = gauged.aggregate('requests', Gauged.SUM, start=datetime(2014, 1, 1),\n end=datetime(2014, 1, 8))\n\n# Get the 95th percentile response time from the past week\nresponse_time = gauged.aggregate('response_time', Gauged.PERCENTILE,\n percentile=95, start=-Gauged.WEEK)\n\n# Get latest memory usage\nmemory_usage = gauged.value('memory_usage')\n```\n\nPlotting (using [matplotlib][matplotlib])\n\n```python\nimport pylab\nseries = gauged.aggregate_series('requests', gauged.SUM, interval=gauged.DAY,\n start=-gauged.WEEK)\npylab.plot(series.dates, series.values, label='Requests per day for the past week')\npylab.show()\n```\n\n## Documentation\n\nSee the [documentation][documentation] or [technical overview][technical-overview].\n\n## Tests\n\nYou can run the test suite using an in-memory driver with `make check-quick`.\n\nTo run the full suite, first edit the configuration in `test_drivers.cfg` so that PostgreSQL and Mysql both point to existing (and empty) databases, then run\n\n```bash\n$ make check\n```\n\nYou can run coverage analysis with `make coverage` and run a lint tool `make lint`.\n\n## Benchmarks\n\nUse `make build` followed by `python benchmark [OPTIONS]` to run benchmarks using a SQLite-based in-memory database. Your mileage will vary once you add I/O.\n\n**python benchmark.py --number 1000000 --days 365**\n\n```\nWriting to sqlite:// (block_size=86400000, resolution=1000)\nSpreading 1M measurements to key \"foobar\" over 365 days\nWrote 1M measurements in 5.388 seconds (185.6K/s) (rss: 12.7MB)\nGauge data uses 7.6MB (8B per measurement)\nmin() in 0.024s (read 41.9M measurements/s) (rss: 12.8MB)\nmax() in 0.023s (read 43.4M measurements/s) (rss: 12.8MB)\nsum() in 0.023s (read 42.7M measurements/s) (rss: 12.8MB)\ncount() in 0.024s (read 42.1M measurements/s) (rss: 12.8MB)\nmean() in 0.028s (read 36.1M measurements/s) (rss: 12.8MB)\nstddev() in 0.05s (read 20.1M measurements/s) (rss: 12.8MB)\nmedian() in 0.06s (read 16.8M measurements/s) (rss: 27.7MB)\n```\n\n**python benchmark.py --number 100000000 --days 365**\n\n```\nWriting to sqlite:// (block_size=86400000, resolution=1000)\nSpreading 100M measurements to key \"foobar\" over 365 days\nWrote 100M measurements in 405.925 seconds (246.4K/s) (rss: 21.7MB)\nGauge data uses 502.2MB (5.26601144B per measurement)\nmin() in 0.818s (read 122.3M measurements/s) (rss: 21.7MB)\nmax() in 0.79s (read 126.6M measurements/s) (rss: 21.7MB)\nsum() in 0.785s (read 127.4M measurements/s) (rss: 21.7MB)\ncount() in 0.766s (read 130.5M measurements/s) (rss: 21.7MB)\nmean() in 0.891s (read 112.3M measurements/s) (rss: 21.7MB)\nstddev() in 1.697s (read 58.9M measurements/s) (rss: 21.7MB)\nmedian() in 3.547s (read 28.2M measurements/s) (rss: 1007.9MB)\n```\n\n## License (MIT)\n\n```\nCopyright (c) 2014 Chris O'Hara \n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n[travis]: https://api.travis-ci.org/chriso/gauged.png?branch=master\n[travis-builds]: https://travis-ci.org/chriso/gauged\n[technical-overview]: https://github.com/chriso/gauged/blob/master/docs/technical-overview.md\n[documentation]: https://github.com/chriso/gauged/blob/master/docs/documentation.md\n[matplotlib]: http://matplotlib.org/\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chriso/gauged", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "gauged", "package_url": "https://pypi.org/project/gauged/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gauged/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/chriso/gauged" }, "release_url": "https://pypi.org/project/gauged/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A fast, append-only storage layer for numeric data that changes over time", "version": "1.0.0" }, "last_serial": 1462325, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "491b8d2e0051be2cbfe4c1a6da62ad69", "sha256": "4f49cdac47257f07dc924184aeea6ab092a0c2c7d370a611fee21b925433145f" }, "downloads": -1, "filename": "gauged-0.1.0.tar.gz", "has_sig": false, "md5_digest": "491b8d2e0051be2cbfe4c1a6da62ad69", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48503, "upload_time": "2014-01-15T02:36:33", "url": "https://files.pythonhosted.org/packages/07/a8/0cc7696dbf2bc139007fc52ac9dcd315d118e266ca9a98093b697a5f5e46/gauged-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "148cd46eb53a42803a0f57c3b58127b2", "sha256": "51e7ac135fecbb6ad78612491c0240f2462146b2bcd43fdf3208bd4cb4a9a893" }, "downloads": -1, "filename": "gauged-0.2.0.tar.gz", "has_sig": false, "md5_digest": "148cd46eb53a42803a0f57c3b58127b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49354, "upload_time": "2014-01-17T00:42:33", "url": "https://files.pythonhosted.org/packages/08/55/aac558919c6786c209aace9fcf8676d35d3ae7ae0a24bc29bfa6d2392ce1/gauged-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "3df97dba4642ad7f0692785d64e19770", "sha256": "fbf6fb393e518065e4a165353547103f20b0f8d714d5319cddabc73f9d25c371" }, "downloads": -1, "filename": "gauged-0.2.1.tar.gz", "has_sig": false, "md5_digest": "3df97dba4642ad7f0692785d64e19770", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49378, "upload_time": "2014-01-28T23:36:55", "url": "https://files.pythonhosted.org/packages/22/1c/bb536bd75de97f19bcdd44e9ca21e9b257a966fb3fdbb98760103118afb1/gauged-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c0780b7c4cc329d64ba0d14c8baeb924", "sha256": "34680191539d8606de55911f26e5420d9a7dd7b44d804c945eada370b37d7f0d" }, "downloads": -1, "filename": "gauged-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c0780b7c4cc329d64ba0d14c8baeb924", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47456, "upload_time": "2014-03-13T09:09:20", "url": "https://files.pythonhosted.org/packages/18/68/431e266e656d1e9bb4165fab9382bb5cacb442f136f345490fb9e63d8c56/gauged-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "2685df659a53f8ff31877c147d84765c", "sha256": "a4c383983fbe9a60b914121e7ddceedb57f59baa477d8a81d555c6ae7a13ee14" }, "downloads": -1, "filename": "gauged-0.4.0.tar.gz", "has_sig": false, "md5_digest": "2685df659a53f8ff31877c147d84765c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47681, "upload_time": "2014-05-26T13:48:50", "url": "https://files.pythonhosted.org/packages/41/cc/8217975a89064811685bf316a81b48e9b22d5f763c5d86ad1c52e4dba7a8/gauged-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "411c98dc0c78e4a08d4e31766d25bc4d", "sha256": "6c4a7a3692c91c433e55b3bfac62b0e00257851e4168bbd5d306df9fb1006b1e" }, "downloads": -1, "filename": "gauged-0.4.1.tar.gz", "has_sig": false, "md5_digest": "411c98dc0c78e4a08d4e31766d25bc4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47740, "upload_time": "2014-05-29T10:20:17", "url": "https://files.pythonhosted.org/packages/70/1b/62b2bb0114065f29d8ecc09e0c3b4efcc039caebb779e1e5ae6f96ab68d3/gauged-0.4.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "5ebf4c3a067dc4b42d154db8e61e5642", "sha256": "d9421ce068ebe51fcb564971923a0de3f676471deebf6249c68ca931e91ad9a8" }, "downloads": -1, "filename": "gauged-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5ebf4c3a067dc4b42d154db8e61e5642", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49015, "upload_time": "2015-03-16T05:25:06", "url": "https://files.pythonhosted.org/packages/26/06/2d15cc54eb50488e3da0bfa4d824a7c1da01ba629b37379d67977090d5d0/gauged-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ebf4c3a067dc4b42d154db8e61e5642", "sha256": "d9421ce068ebe51fcb564971923a0de3f676471deebf6249c68ca931e91ad9a8" }, "downloads": -1, "filename": "gauged-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5ebf4c3a067dc4b42d154db8e61e5642", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 49015, "upload_time": "2015-03-16T05:25:06", "url": "https://files.pythonhosted.org/packages/26/06/2d15cc54eb50488e3da0bfa4d824a7c1da01ba629b37379d67977090d5d0/gauged-1.0.0.tar.gz" } ] }