- if nbSamples then
- for l, t in pairs(model.accTime) do
- print(string.format('%s %s %.02fs (%.01fmus/sample)',
- indent,
- l,
- t,
- 1e6 * t / nbSamples))
+ for l, t in pairs(model.accTime) do
+ local s = string.format('%s %s %.02fs', indent, l, t)
+ if totalTime then
+ s = s .. string.format(' [%.02f%%]', 100 * t / totalTime)