Ble*_*der 3 profiling sbcl common-lisp
我需要分析一个“慢”的函数,即它需要很长时间才能终止(如果有的话)。在我看来,仍然可以使用 SBCL 中的统计分析器来分析这个函数,因为它只是定期采样。然而,当我跑
(sb-sprof:with-profiling (:max-samples 1000 :report :flat :loop nil)
(the-function-in-question))
Run Code Online (Sandbox Code Playgroud)
探查器只是打印
Profiler 样本向量已满(537 条轨迹/10000 个样本),大小加倍
但永远不会带着报告回来。
我的想法是否可能,如果有,我该如何实现?
如果函数没有返回,报告将不会被打印,显然。您可以使用以下操作序列来查看报告:
(require :sb-sprof)(sb-sprof:start-profiling)(the-function-in-question)(sb-sprof:report :type :flat)| 归档时间: |
|
| 查看次数: |
552 次 |
| 最近记录: |