{"id":16885078,"url":"https://github.com/ericchiang/memplot","last_synced_at":"2025-04-11T12:33:00.415Z","repository":{"id":57440831,"uuid":"20315012","full_name":"ericchiang/memplot","owner":"ericchiang","description":"Plot the memory usage of arbitrary processes","archived":false,"fork":false,"pushed_at":"2020-03-12T17:03:34.000Z","size":125,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T08:51:17.334Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericchiang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-30T02:36:26.000Z","updated_at":"2022-02-21T13:57:56.000Z","dependencies_parsed_at":"2022-09-26T17:20:47.793Z","dependency_job_id":null,"html_url":"https://github.com/ericchiang/memplot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fmemplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fmemplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fmemplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericchiang%2Fmemplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericchiang","download_url":"https://codeload.github.com/ericchiang/memplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402257,"owners_count":21097328,"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","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":[],"created_at":"2024-10-13T16:33:16.755Z","updated_at":"2025-04-11T12:33:00.395Z","avatar_url":"https://github.com/ericchiang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"memplot\n=======\n\nPlot the memory usage of arbitrary processes\n\n\nInstall\n-------\n\npypi:\n```bash\n$ pip install memplot\n```\n\nFrom source:\n```bash\n$ git clone https://github.com/EricChiang/memplot.git\n$ cd memplot\n$ python setup.py install\n```\n\nUsage\n-----\n\nWhat's the memory usage of the `pickle` package? Let's consider the following script save under `pickle_array.py`\n```python\nimport numpy as np\nimport pickle\nimport time\n\nx = np.random.randn(1000,10000)\ntime.sleep(1)\npickle.dump(x,open(\"x.pk\",\"w\"))\n```\n\nTo plot memory usage run:\n```bash\n$ memplot python pickle_array.py\n```\n\nThis command produces the following plot:\n![pickle an array](imgs/python_pickle_array.png)\n\nHow does R do? Here's a similar serialization script saved as `save_array.r`\n\n```Rscript\nx \u003c- matrix(rnorm(1000,10000),1000,10000)\nSys.sleep(1)\nsave(x,file=\"x.Rdata\")\n```\n\nTime to plot the memory usage:\n```bash\n$ memplot Rscript save_array.r\n```\n\n![save an array](imgs/r_save_array.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchiang%2Fmemplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericchiang%2Fmemplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericchiang%2Fmemplot/lists"}