如何在DrScheme个人资料?
-
21-08-2019 - |
题
我如何使用DrScheme分析我的功能呢?
(require profile)
(define (factorial n)
(cond
((= n 1) 1)
(else (* n (factorial (- n 1))))))
(profile factorial)
上面的代码返回
Profiling results
-----------------
Total cpu time observed: 0ms (out of 0ms)
Number of samples taken: 0 (once every 0ms)
====================================
Caller
Idx Total Self Name+srcLocal%
ms(pct) ms(pct) Callee
====================================
>
我尝试: - (轮廓(阶乘100)),点击 - (配置文件阶乘)(阶乘100)点击 但它给了我同样的结果。 我在做什么错了?
解决方案
我不熟悉PLT方案profile
模块,但也许你有实际调用该函数?
(profile (factorial 1000))
其他提示
不隶属于 StackOverflow