我試圖測量我的應用程序中兩點之間在GC之間花了多少時間。就像這樣: GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
gcPerfCounter.NextValue();
// This is the part that I would like to measure
doStuff();
var timeSpen
我無法使Python memory line profiler正常工作。每當我從內IPython中運行%mprun,我得到的錯誤 TypeError: unicode argument expected, got 'str'
我使用的是我能想象最簡單的例子。 In [1]: %load_ext memory_profiler
In [2]: from mpruntest import fun