{ "info": { "author": "Lujeni", "author_email": "julien@thebault.co", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: Unix", "Programming Language :: Python :: 2.7" ], "description": "=========\nSurcharge\n=========\n.. image:: https://pypip.in/download/surcharge/badge.png\n :target: https://pypi.python.org/pypi/surcharge/\n :alt: Downloads\n\n.. image:: https://pypip.in/version/surcharge/badge.png\n :target: https://pypi.python.org/pypi/surcharge/\n :alt: Latest Version\n \nIssues\n======\n- ProgressBar issues\n- DNS resolution is wrong\n\nIntroduction\n============\n**Surcharge** is a tool for benchmarking your web server like **apache benchmark**.\nSurcharge uses the **gevent** networking library. Using the **greenlets** allow to spawn many concurrent requests with little memory.\nHTTP requests are made with **requests** library.\n\n\nRequirements\n============\nThis code has been run on Python 2.7\n::\n\n # install by the setup\n greenlet==0.4.0\n gevent==0.13.6\n requests==1.2.3\n progressbar==2.3\n\nInstallation\n============\n::\n\n $ pip install surcharge #and enjoy\n\nTests\n=====\n\nExample command\n===============\n::\n\n\n # simple call\n $ surcharge http://google.com --numbers 10 --concurrency 5\n\n # standard stdout\n Server: gws\n\n URL: http://173.194.67.138:80\n\n Concurrency level: 5\n\n Options: {'cookies': {}, 'timeout': 2.0}\n\n\n 100% |############################|\n\n\n Number process requests: 10\n Time taken for tests: 0.57\n Complete requests: 10\n Failed requests: 0\n Faster request: 0.045\n Slower request: 0.059\n Time per request (only success): 0.051\n Request per second: 98.57\n\n # call with multiple cookies\n $ surcharge http://httpbin.org/cookies --cookies \"{'ck':1, 'cook':value}\"\n\n # call with HTTP Basic Auth\n $ surcharge https://secure.test.com --auth \"user:password\"\n\n # bench during 10 seconds\n $ surcharge http://google.com --concurrency 10 --duration 10\n\n\nExample API\n===========\n::\n\n\n # see the constructor or the surcharge/cli.py for more details\n >>> from surcharge.core import Surcharger\n >>> surcharge = Surcharger(url='http://google.com')\n >>> surcharge()\n\n >>> surcharge.result\n defaultdict(, {200: [0.06690406799316406]})\n\n # compute simple stat\n >>> from surcharge.core import SurchargerStats\n >>> surcharge_stats = SurchargerStats(surcharge)\n >>> surcharge_stats()\n\n >>> surcharge_stats.stats\n {'RPS': 14.20353538774128,\n 'exec_time': 0.07088184356689453,\n 'max': 0.0704050064086914,\n 'min': 0.0704050064086914,\n 'moy': 0.0704050064086914,\n 'requests_process': 0.0704050064086914,\n 'total': 1,\n 'total_failed': 0,\n 'total_success': 1}\n\n # By default, stdout is used to display the stats\n # You can override the SurchargerStats.send method and make what you want with the stats\n\n # example with a *request\" option (auth)\n >>> surcharge = Surcharger(url='http://google.com', **{'auth': ('user', 'pass')})\n\n\nUsage\n=====\n::\n\n\n Usage:\n surcharge \n [--method=]\n [--concurrency=]\n [--numbers= | --duration=]\n [--timeout=]\n [--cookies=]\n\n Options:\n -h --help Show this screen.\n -v --version Show version.\n -m --method= HTTP method [default: GET].\n -c --concurrency= Number of multiple requests to perform at a time [default: 1].\n -n --numbers= Number of requests to perform for the benchmarking session [default: 1].\n -D --duration= Duration in seconds. Override the --numbers option [default: 0]\n -T --timeout= You can tell requests to stop waiting for a response after a given number of seconds [default: 2].\n -C --cookies= Send your own cookies. [default: {}]\n\nLogs\n====\nYou can retrieve some informations in the */tmp/surcharge_activity.log* log file.\n\nDeprecated - need refactoring\n=============================\n (`since 0.8`) **Overflow** is a module of Surcharge. It's allows to launch several benchmarks dynamically through the network. Overflow uses the **zeroMQ** library.\n\nLicense\n=======\nThis project is lecensed under the MIT license, a copy of which can be found in the LICENSE file.", "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/Lujeni/Surcharge", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "surcharge", "package_url": "https://pypi.org/project/surcharge/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/surcharge/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Lujeni/Surcharge" }, "release_url": "https://pypi.org/project/surcharge/0.9.1/", "requires_dist": null, "requires_python": null, "summary": "Surcharge is a tool for benchmarking your web server", "version": "0.9.1" }, "last_serial": 1402965, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "cb02d4bdf77a4788a6f6fd0de1e3818a", "sha256": "28926d319fe35f940edb408913f948af31dd6ee4fb1abae6ca6566815f3803b2" }, "downloads": -1, "filename": "surcharge-0.3.tar.gz", "has_sig": false, "md5_digest": "cb02d4bdf77a4788a6f6fd0de1e3818a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4697, "upload_time": "2013-03-16T01:39:45", "url": "https://files.pythonhosted.org/packages/0f/a3/d50d117661dd130be95d3e0bc9db0c7d550164dc937dac3b0de075c197f9/surcharge-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "6854e169f052b70a35564dc3527ff098", "sha256": "6cabf70057271794c9b3930faaf298a9632a83708f0dade2f529a8fbdb45ec88" }, "downloads": -1, "filename": "surcharge-0.4.tar.gz", "has_sig": false, "md5_digest": "6854e169f052b70a35564dc3527ff098", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4696, "upload_time": "2013-03-16T01:54:12", "url": "https://files.pythonhosted.org/packages/08/91/568c01bb205d264fa8bf645248ab01ab0434687cbc9ed0f09ad1f1b68911/surcharge-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e7d7d6c4595d788de5de539a36dcf311", "sha256": "106a619a33639498915a5ef832576784feb95d84ac4f8653487062fb93b174e4" }, "downloads": -1, "filename": "surcharge-0.5.tar.gz", "has_sig": false, "md5_digest": "e7d7d6c4595d788de5de539a36dcf311", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5112, "upload_time": "2013-03-16T15:27:40", "url": "https://files.pythonhosted.org/packages/da/57/b56681b0ed78ac985f5495388fa76abdb72f6ab75cdc7156797f3780dd3b/surcharge-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "68ea960ea7a43cb120ae2becc9d73699", "sha256": "e609bfd7edd0ef8488865b72b885b07057b2926e525ad70cc688f354e90c9182" }, "downloads": -1, "filename": "surcharge-0.6.tar.gz", "has_sig": false, "md5_digest": "68ea960ea7a43cb120ae2becc9d73699", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5259, "upload_time": "2013-03-17T01:14:12", "url": "https://files.pythonhosted.org/packages/7f/f9/b2edad62b50c66ef3a0adfae9f34564a73b25516a44d01d1ac07103e2039/surcharge-0.6.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "40dc0e5465eec6222ed4298f70b1ad04", "sha256": "6ac8e1f9962119cee6df7bb91ad71ceb9906c674672b13156cb399d685dc68c3" }, "downloads": -1, "filename": "surcharge-0.7.1.tar.gz", "has_sig": false, "md5_digest": "40dc0e5465eec6222ed4298f70b1ad04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7837, "upload_time": "2013-04-27T18:34:52", "url": "https://files.pythonhosted.org/packages/48/cb/427e4d26f80efb49bd0007e8a9311b006cdc9c90c2b9a0de7fc7fef9988b/surcharge-0.7.1.tar.gz" } ], "0.9.0": [ { "comment_text": "", "digests": { "md5": "2f824779a8a278d3849658275171097b", "sha256": "c21a7a880490e202e476564df5551016adcde0523f61b2fb82724f377f7def56" }, "downloads": -1, "filename": "surcharge-0.9.0.tar.gz", "has_sig": false, "md5_digest": "2f824779a8a278d3849658275171097b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12836, "upload_time": "2014-06-18T20:29:05", "url": "https://files.pythonhosted.org/packages/90/1b/8e111dce7b0e296f87df5e28e286b169ca6095ec397b4ac80ce1b67267a3/surcharge-0.9.0.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "42c995cb1630574ce4165d3a9463805d", "sha256": "c6b6b02cd3dd17ac42470aa54407955c93ccd0c4ce381c101d2ba108855f78d0" }, "downloads": -1, "filename": "surcharge-0.9.1.tar.gz", "has_sig": false, "md5_digest": "42c995cb1630574ce4165d3a9463805d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13248, "upload_time": "2015-01-30T11:16:10", "url": "https://files.pythonhosted.org/packages/7f/da/ac7e767dd747ed91b1973536b04556fb330eda170c4af45de4e7ed326b38/surcharge-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42c995cb1630574ce4165d3a9463805d", "sha256": "c6b6b02cd3dd17ac42470aa54407955c93ccd0c4ce381c101d2ba108855f78d0" }, "downloads": -1, "filename": "surcharge-0.9.1.tar.gz", "has_sig": false, "md5_digest": "42c995cb1630574ce4165d3a9463805d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13248, "upload_time": "2015-01-30T11:16:10", "url": "https://files.pythonhosted.org/packages/7f/da/ac7e767dd747ed91b1973536b04556fb330eda170c4af45de4e7ed326b38/surcharge-0.9.1.tar.gz" } ] }