<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hayataka2049</author_name>
  <author_url>https://blog.hatena.ne.jp/hayataka2049/</author_url>
  <blog_title>静かなる名辞</blog_title>
  <blog_url>https://hayataka2049.hatenablog.jp/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>Tips</anon>
  </categories>
  <description>簡単なテストや処理をしているとき、Pythonプロセス自身のメモリ消費量を計算したくなるときがある。やり方を知らなかったけど、頑張って検索したら出てきたのでメモ。 import os import psutil process = psutil.Process(os.getpid()) print(process.memory_info().rss) 参考にしたもの（というか、そのまま） Total memory used by Python process? - Stack Overflow psutilは標準ライブラリではなく、外部ライブラリ。活発に開発されている。インストールは普通にpi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhayataka2049.hatenablog.jp%2Fentry%2F2019%2F07%2F16%2F230227&quot; title=&quot;Pythonプロセスの自分自身のメモリ使用量を調べる - 静かなる名辞&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-07-16 23:02:27</published>
  <title>Pythonプロセスの自分自身のメモリ使用量を調べる</title>
  <type>rich</type>
  <url>https://hayataka2049.hatenablog.jp/entry/2019/07/16/230227</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
