{"id":30873596,"url":"https://github.com/duboviy/pybenchmark","last_synced_at":"2025-09-07T23:11:54.412Z","repository":{"id":53854470,"uuid":"69124810","full_name":"duboviy/pybenchmark","owner":"duboviy","description":"🔨 A benchmark utility used in performance tests","archived":false,"fork":false,"pushed_at":"2020-04-26T19:57:07.000Z","size":98,"stargazers_count":22,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-08T19:32:22.887Z","etag":null,"topics":["benchmark","performance","python","testing"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/pybenchmark","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duboviy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2016-09-24T20:04:55.000Z","updated_at":"2023-12-19T10:51:05.000Z","dependencies_parsed_at":"2022-08-23T06:30:57.906Z","dependency_job_id":null,"html_url":"https://github.com/duboviy/pybenchmark","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/duboviy/pybenchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fpybenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fpybenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fpybenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fpybenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duboviy","download_url":"https://codeload.github.com/duboviy/pybenchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duboviy%2Fpybenchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274107977,"owners_count":25223473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","performance","python","testing"],"created_at":"2025-09-07T23:11:49.168Z","updated_at":"2025-09-07T23:11:54.405Z","avatar_url":"https://github.com/duboviy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\u003cimg src=\"https://raw.githubusercontent.com/duboviy/pybenchmark/master/logo.png\" height=85 alt=\"logo\" title=\"logo\"\u003e pybenchmark\u003c/h1\u003e\n\nby [Eugene Duboviy](https://duboviy.github.io/)\n\n[![Build Status](https://travis-ci.org/duboviy/pybenchmark.svg?branch=master)](https://travis-ci.org/duboviy/pybenchmark) [![CircleCI](https://circleci.com/gh/duboviy/pybenchmark.svg?style=svg)](https://circleci.com/gh/duboviy/pybenchmark) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/65b87a80bd0c47c59304af998e8e4f0c)](https://www.codacy.com/app/dubovoy/pybenchmark?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=duboviy/pybenchmark\u0026amp;utm_campaign=Badge_Grade) [![PyPI](https://img.shields.io/pypi/v/pybenchmark.svg)](https://pypi.python.org/pypi/pybenchmark) [![Code Health](https://landscape.io/github/duboviy/pybenchmark/master/landscape.svg?style=flat)](https://landscape.io/github/duboviy/pybenchmark/master) [![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://github.com/duboviy/pybenchmark/) [![PRs \u0026 Issues Welcome](https://img.shields.io/badge/PRs%20\u0026%20Issues-welcome-brightgreen.svg)](https://github.com/duboviy/pybenchmark/pulls) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/duboviy/pybenchmark/)\n\nA benchmark utility used in speed / performance tests.\n\n## Summary\n\nWhen measuring execution time, the result depends on the computer hardware.\nTo be able to produce a universal measure, the simplest way is to benchmark the\nspeed of a fixed sequence of code and calculate a ratio out of it. From there, the time\ntaken by a function can be translated to a universal value that can be compared on\nany computer. Python provides a benchmark utility in its test package that measures the duration\nof a sequence of well-chosen operations. pybenchmark designed to provide a simple \nand pythonic way to get performance data.\n\n## Current features\n\n* Simple usage workflow\n* Decorator for profiling\n* A la carte usage of decorator in place\n* Provide a simple way to get CPU and memory details information\n\n## Installation:\n\nInstall from PyPI:\n```\n$ pip install pybenchmark\n```\nOr using alternative command:\n```\n$ pip install https://github.com/duboviy/pybenchmark/archive/master.zip\n```\nOr from source use:\n```\n$ python setup.py install\n```\n\n## Supported python versions\n\n  * 2.7\n  * 3.3\n  * 3.4\n  * 3.5\n  * 3.6\n  * PyPy\n\n## PyPI\n\n* [Package](https://pypi.python.org/pypi/pybenchmark)\n* [Documentation](https://pythonhosted.org/pybenchmark/)\n\n## Basic usage examples\n\nYou can use profile decorator to wrap your code:\n\n```python\nimport pybenchmark\n\n@pybenchmark.profile()\ndef some_code():\n    time.sleep(0.5)\n\nsome_code()\nprint(pybenchmark.stats)\n{'stats':  {'kstones': 24.278059746455238, 'time': 0.50012803077697754, 'memory': 0}\n```\n\nAlso you can use decorator à la carte,\nif you don't want to edit/disturb your source code (for example, when writing tests):\n\n```python\nimport pybenchmark\n\neat_cpu_time = lambda: 2**100000000\n\n# using decorator à la carte below\neat_it = pybenchmark.profile('you bad boy!')(eat_cpu_time)\neat_it()\n\nprint(pybenchmark.stats)\n{'you bad boy!': {'kstones': 14.306935999128555, 'time': 0.30902981758117676, 'memory': 8096}}\n```\n\nYou can use module for visualizing Python code profiles using the Chrome developer tools:\n\n```python\nfrom pybenchmark import GProfiler\n\nprofiler = GProfiler()\nprofiler.start()\nmy_expensive_code()\nprofiler.stop()\n\nwith open('my.cpuprofile', 'w') as f:\n    f.write(profiler.output())\n```\n\nOr you can use context manager:\n\n```python\nwith GProfiler() as profiler:\n    my_expensive_code()\n\n# file with name './pybenchmark_%s_.cpuprofile' % os.getpid() would be created\n```\n\nThen load json file into chrome developer tools timeline.\nTo get the timeline chart load the file into Profiles tool from Chrome Dev Tools.\nThere is a \"Load\" button just under the list of profiles.\nThen timeline-chart can be obtained by changing Heavy(Bottom Up) option to Chart.\nYou can use it with or without gevent framework.\n\u003cimg src=\"http://i.stack.imgur.com/To8Nw.png\" alt=\"\u0026quot;Load\u0026quot; button on the Profiles tab in Chrome DevTools\"\u003e\n\n\nYou can get CPU machine details information (on LINUX-based systems): \n\n```\n\u003e\u003e\u003e from pybenchmark import CpuInfo\n\u003e\u003e\u003e cpu = CpuInfo()\n\u003e\u003e\u003e cpu\nprocessor\t: 0\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 42\nmodel name\t: Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\nstepping\t: 7\nmicrocode\t: 0x28\ncpu MHz\t\t: 1600.257\ncache size\t: 3072 KB\nphysical id\t: 0\nsiblings\t: 4\ncore id\t\t: 0\ncpu cores\t: 2\napicid\t\t: 0\ninitial apicid\t: 0\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 13\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\nbogomips\t: 6784.56\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 36 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 1\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 42\nmodel name\t: Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\nstepping\t: 7\nmicrocode\t: 0x28\ncpu MHz\t\t: 1600.523\ncache size\t: 3072 KB\nphysical id\t: 0\nsiblings\t: 4\ncore id\t\t: 1\ncpu cores\t: 2\napicid\t\t: 2\ninitial apicid\t: 2\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 13\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\nbogomips\t: 6784.56\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 36 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 2\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 42\nmodel name\t: Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\nstepping\t: 7\nmicrocode\t: 0x28\ncpu MHz\t\t: 1595.476\ncache size\t: 3072 KB\nphysical id\t: 0\nsiblings\t: 4\ncore id\t\t: 0\ncpu cores\t: 2\napicid\t\t: 1\ninitial apicid\t: 1\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 13\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\nbogomips\t: 6784.56\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 36 bits physical, 48 bits virtual\npower management:\n\nprocessor\t: 3\nvendor_id\t: GenuineIntel\ncpu family\t: 6\nmodel\t\t: 42\nmodel name\t: Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\nstepping\t: 7\nmicrocode\t: 0x28\ncpu MHz\t\t: 1599.062\ncache size\t: 3072 KB\nphysical id\t: 0\nsiblings\t: 4\ncore id\t\t: 1\ncpu cores\t: 2\napicid\t\t: 3\ninitial apicid\t: 3\nfpu\t\t: yes\nfpu_exception\t: yes\ncpuid level\t: 13\nwp\t\t: yes\nflags\t\t: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\nbogomips\t: 6784.56\nclflush size\t: 64\ncache_alignment\t: 64\naddress sizes\t: 36 bits physical, 48 bits virtual\n```\n\nReturn output as dict:\n\n```\n\u003e\u003e\u003e cpu.dict()\n{\n    \"1\": {\n        \"cpu cores\": \"2\",\n        \"bogomips\": \"6784.56\",\n        \"core id\": \"1\",\n        \"apicid\": \"2\",\n        \"fpu_exception\": \"yes\",\n        \"stepping\": \"7\",\n        \"cache_alignment\": \"64\",\n        \"clflush size\": \"64\",\n        \"microcode\": \"0x28\",\n        \"cache size\": \"3072 KB\",\n        \"cpuid level\": \"13\",\n        \"fpu\": \"yes\",\n        \"model name\": \"Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\",\n        \"siblings\": \"4\",\n        \"physical id\": \"0\",\n        \"address sizes\": \"36 bits physical, 48 bits virtual\",\n        \"cpu family\": \"6\",\n        \"vendor_id\": \"GenuineIntel\",\n        \"wp\": \"yes\",\n        \"power management\": \"\",\n        \"flags\": \"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\",\n        \"cpu MHz\": \"1683.398\",\n        \"model\": \"42\",\n        \"processor\": \"1\",\n        \"initial apicid\": \"2\"\n    },\n    \"0\": {\n        \"cpu cores\": \"2\",\n        \"bogomips\": \"6784.56\",\n        \"core id\": \"0\",\n        \"apicid\": \"0\",\n        \"fpu_exception\": \"yes\",\n        \"stepping\": \"7\",\n        \"cache_alignment\": \"64\",\n        \"clflush size\": \"64\",\n        \"microcode\": \"0x28\",\n        \"cache size\": \"3072 KB\",\n        \"cpuid level\": \"13\",\n        \"fpu\": \"yes\",\n        \"model name\": \"Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\",\n        \"siblings\": \"4\",\n        \"physical id\": \"0\",\n        \"address sizes\": \"36 bits physical, 48 bits virtual\",\n        \"cpu family\": \"6\",\n        \"vendor_id\": \"GenuineIntel\",\n        \"wp\": \"yes\",\n        \"power management\": \"\",\n        \"flags\": \"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\",\n        \"cpu MHz\": \"1601.187\",\n        \"model\": \"42\",\n        \"processor\": \"0\",\n        \"initial apicid\": \"0\"\n    },\n    \"3\": {\n        \"cpu cores\": \"2\",\n        \"bogomips\": \"6784.56\",\n        \"core id\": \"1\",\n        \"apicid\": \"3\",\n        \"fpu_exception\": \"yes\",\n        \"stepping\": \"7\",\n        \"cache_alignment\": \"64\",\n        \"clflush size\": \"64\",\n        \"microcode\": \"0x28\",\n        \"cache size\": \"3072 KB\",\n        \"cpuid level\": \"13\",\n        \"fpu\": \"yes\",\n        \"model name\": \"Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\",\n        \"siblings\": \"4\",\n        \"physical id\": \"0\",\n        \"address sizes\": \"36 bits physical, 48 bits virtual\",\n        \"cpu family\": \"6\",\n        \"vendor_id\": \"GenuineIntel\",\n        \"wp\": \"yes\",\n        \"power management\": \"\",\n        \"flags\": \"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\",\n        \"cpu MHz\": \"1612.476\",\n        \"model\": \"42\",\n        \"processor\": \"3\",\n        \"initial apicid\": \"3\"\n    },\n    \"2\": {\n        \"cpu cores\": \"2\",\n        \"bogomips\": \"6784.56\",\n        \"core id\": \"0\",\n        \"apicid\": \"1\",\n        \"fpu_exception\": \"yes\",\n        \"stepping\": \"7\",\n        \"cache_alignment\": \"64\",\n        \"clflush size\": \"64\",\n        \"microcode\": \"0x28\",\n        \"cache size\": \"3072 KB\",\n        \"cpuid level\": \"13\",\n        \"fpu\": \"yes\",\n        \"model name\": \"Intel(R) Core(TM) i3-2130 CPU @ 3.40GHz\",\n        \"siblings\": \"4\",\n        \"physical id\": \"0\",\n        \"address sizes\": \"36 bits physical, 48 bits virtual\",\n        \"cpu family\": \"6\",\n        \"vendor_id\": \"GenuineIntel\",\n        \"wp\": \"yes\",\n        \"power management\": \"\",\n        \"flags\": \"fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\",\n        \"cpu MHz\": \"1600.125\",\n        \"model\": \"42\",\n        \"processor\": \"2\",\n        \"initial apicid\": \"1\"\n    }\n}\n```\n\nSearch (is case insensitive):\n\n```\n\u003e\u003e\u003e cpu.search('CPU Mhz')\n['cpu MHz\\t\\t: 1599.062\\n', 'cpu MHz\\t\\t: 1600.125\\n', 'cpu MHz\\t\\t: 1598.398\\n', 'cpu MHz\\t\\t: 1601.320\\n']\n```\n\nYou can also get memory machine details information (on LINUX-based systems):\n\n```\n\u003e\u003e\u003e from pybenchmark import MemInfo\n\u003e\u003e\u003e mem = MemInfo()\n\u003e\u003e\u003e mem\nMemTotal:        8092460 kB\nMemFree:          499880 kB\nMemAvailable:    5454920 kB\nBuffers:          219088 kB\nCached:          4980040 kB\nSwapCached:         7576 kB\nActive:          5647392 kB\nInactive:        1628708 kB\nActive(anon):    1794356 kB\nInactive(anon):   492656 kB\nActive(file):    3853036 kB\nInactive(file):  1136052 kB\nUnevictable:         200 kB\nMlocked:             200 kB\nSwapTotal:      16776188 kB\nSwapFree:       16639112 kB\nDirty:               172 kB\nWriteback:             0 kB\nAnonPages:       2070440 kB\nMapped:           204800 kB\nShmem:            210036 kB\nSlab:             247884 kB\nSReclaimable:     219356 kB\nSUnreclaim:        28528 kB\nKernelStack:        4144 kB\nPageTables:        11904 kB\nNFS_Unstable:          0 kB\nBounce:                0 kB\nWritebackTmp:          0 kB\nCommitLimit:    20822416 kB\nCommitted_AS:    3317504 kB\nVmallocTotal:   34359738367 kB\nVmallocUsed:      362844 kB\nVmallocChunk:   34359347296 kB\nHardwareCorrupted:     0 kB\nAnonHugePages:         0 kB\nHugePages_Total:       0\nHugePages_Free:        0\nHugePages_Rsvd:        0\nHugePages_Surp:        0\nHugepagesize:       2048 kB\nDirectMap4k:       83644 kB\nDirectMap2M:     8202240 kB\n```\n\nReturn output as dict:\n\n```\n\u003e\u003e\u003e mem.dict()\n{\n\t\"WritebackTmp\": \"0 kB\",\n\t\"SwapTotal\": \"16776188 kB\",\n\t\"Active(anon)\": \"1794356 kB\",\n\t\"SwapFree\": \"16639112 kB\",\n\t\"DirectMap4k\": \"83644 kB\",\n\t\"KernelStack\": \"4144 kB\",\n\t\"MemFree\": \"499880 kB\",\n\t\"HugePages_Rsvd\": \"0\",\n\t\"Committed_AS\": \"3317504 kB\",\n\t\"SUnreclaim\": \"28528 kB\",\n\t\"NFS_Unstable\": \"0 kB\",\n\t\"VmallocChunk\": \"34359347296 kB\",\n\t\"Writeback\": \"0 kB\",\n\t\"Inactive(file)\": \"1136052 kB\",\n\t\"MemTotal\": \"8092460 kB\",\n\t\"VmallocUsed\": \"362844 kB\",\n\t\"HugePages_Free\": \"0\",\n\t\"AnonHugePages\": \"0 kB\",\n\t\"Shmem\": \"210036 kB\",\n\t\"AnonPages\": \"2070440 kB\",\n\t\"Active\": \"5647392 kB\",\n\t\"Inactive(anon)\": \"492656 kB\",\n\t\"HugePages_Total\": \"0\",\n\t\"Hugepagesize\": \"2048 kB\",\n\t\"Cached\": \"4980040 kB\",\n\t\"SwapCached\": \"7576 kB\",\n\t\"VmallocTotal\": \"34359738367 kB\",\n\t\"Dirty\": \"172 kB\",\n\t\"Mapped\": \"204800 kB\",\n\t\"Unevictable\": \"200 kB\",\n\t\"SReclaimable\": \"219356 kB\",\n\t\"MemAvailable\": \"5454920 kB\",\n\t\"Slab\": \"247884 kB\",\n\t\"DirectMap2M\": \"8202240 kB\",\n\t\"HugePages_Surp\": \"0\",\n\t\"Bounce\": \"0 kB\",\n\t\"Inactive\": \"1628708 kB\",\n\t\"PageTables\": \"11904 kB\",\n\t\"HardwareCorrupted\": \"0 kB\",\n\t\"CommitLimit\": \"20822416 kB\",\n\t\"Mlocked\": \"200 kB\",\n\t\"Buffers\": \"219088 kB\",\n\t\"Active(file)\": \"3853036 kB\"\n}\n```\n\nSearch (is case insensitive):\n\n```\n\u003e\u003e\u003e mem.search('Swap')\n['SwapCached:         7576 kB\\n', 'SwapTotal:      16776188 kB\\n', 'SwapFree:       16639112 kB\\n']\n```\n\nGet memory usage as int (is case sensitive):\n\n```\n\u003e\u003e\u003e mem.get('Inactive(anon)')\n492656\n```\n\n\n## License\n\n**MIT** licensed library. See [LICENSE.txt](LICENSE.txt) for details.\n\n## Contributing\n\nIf you have suggestions for improving the pybenchmark, please [open an issue or\npull request on GitHub](https://github.com/duboviy/pybenchmark/).\n\n## Badges\n\n[![forthebadge](http://forthebadge.com/images/badges/fuck-it-ship-it.svg)](https://github.com/duboviy/pybenchmark/)\n[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](https://github.com/duboviy/pybenchmark/) [![forthebadge](http://forthebadge.com/images/badges/built-by-hipsters.svg)](https://github.com/duboviy/pybenchmark/) [![forthebadge](http://forthebadge.com/images/badges/built-with-swag.svg)](https://github.com/duboviy/pybenchmark/)\n\n[![forthebadge](http://forthebadge.com/images/badges/powered-by-electricity.svg)](https://github.com/duboviy/pybenchmark/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-oxygen.svg)](https://github.com/duboviy/pybenchmark/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-water.svg)](https://github.com/duboviy/pybenchmark/) [![forthebadge](http://forthebadge.com/images/badges/powered-by-responsibility.svg)](https://github.com/duboviy/pybenchmark/)\n\n[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/ellerbrock/open-source-badge/)\n\n[![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](https://github.com/duboviy/pybenchmark/)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduboviy%2Fpybenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduboviy%2Fpybenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduboviy%2Fpybenchmark/lists"}