<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>arakan_no_boku</author_name>
  <author_url>https://blog.hatena.ne.jp/arakan_no_boku/</author_url>
  <blog_title>BOKUのブログ</blog_title>
  <blog_url>https://arakan-pgm-ai.hatenablog.com/</blog_url>
  <categories>
    <anon>GO言語でボケ防止</anon>
  </categories>
  <description>今回は、関数単位で実行時間を計測してログに残す処理の実装という話題です。 ７０歳目前になり「ボケ防止」でGo言語プログラミングの学びなおしをしていて「プロファイラみたいに関数単位の実行時間を取得したいな」と思ったからです。 まあ、 start := time.Now() でスタート時間を記録 elapsed := time.Since(start) でかかった時間を取得 みたいにガシガシソースに書き込めばできるんですけど、そういう力業は好みではなく、独立した時間計測関数を定義（例えば「Trace()」という名前）して、その関数宣言を、計測したい関数の頭に計測処理（Trace()等）を１行埋め込…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Farakan-pgm-ai.hatenablog.com%2Fentry%2F2026%2F07%2F13%2F000000&quot; title=&quot;ボケ防止にGO言語の勉強／関数単位の実行時間を計測しログに残す「実行時間トレース」を実装する - BOKUのブログ&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>https://cdn.user.blog.st-hatena.com/default_entry_og_image/126019961/1750319593870251</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-07-13 00:00:00</published>
  <title>ボケ防止にGO言語の勉強／関数単位の実行時間を計測しログに残す「実行時間トレース」を実装する</title>
  <type>rich</type>
  <url>https://arakan-pgm-ai.hatenablog.com/entry/2026/07/13/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
