<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                ## pprof 支持 在 golang 官方包中有一個 pprof 包專門用來做性能分析; 該工具能方便的對我們的程序進行 內存,goroutine,cpu 進行分析; 使用該包時會有幾個 http 接口暴露出來; 為了接入方便,Orange 框架已經進行了封裝,通過配置文件即可開啟或關閉性能分析接口。 ### 快速使用 通過該配置可以進行配置性能分析接口的開啟與關閉; ~~~ [app] ... pprofOpen = true ~~~ 功能開啟后,我們啟動項目,可以通過訪問 [http://127.0.0.1:8088/debug/pprof/](http://127.0.0.1:8088/debug/pprof/) 來查看性能分析頁面; 通過 go tool 工具還能將相關的性能指標生成 svg 查看; ### 分析接口 CPU 分析:http://127.0.0.1.1:8088/debug/pprof/profile Goroutine 阻塞事件:http://127.0.0.1.1:8088/debug/pprof/block 活躍的 Goroutine:http://127.0.0.1.1:8088/debug/pprof/goroutine 堆內存分類分析:http://127.0.0.1.1:8088/debug/pprof/heap 互斥鎖分析:http://127.0.0.1.1:8088/debug/pprof/mutex 系統線程分析:http://127.0.0.1.1:8088/debug/pprof/threadcreate ### 生成 svg 通過如下命令可以將 cpu 分析結果保持到一個 svg 文件中 ``` go tool pprof -svg -output ./cpu.svg http://127.0.0.1.1:8088/debug/pprof/profile ``` 說明:默認情況下 cup 分析會監控30s內的 cpu 使用情況,還可以通過在接口后面添加參數來配置時間,如果分析 60s 如下: ``` go tool pprof -svg -output ./cpu.svg http://127.0.0.1.1:8088/debug/pprof/profile?seconds=60 ``` 另外,也可以將相應的分析結果源文件保存到本地后進行svg生成,以實現自動化程序調用等功能。 例如,我們將 http://127.0.0.1.1:8088/debug/pprof/profile 地址請求到的文件保存到本地 ./profile 文件,然后我們可以通過如下命令來轉換成 svg 格式 ``` go tool pprof -svg -output ./profile .svg ./profile ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看