- if nbSamples then
- print(string.format('%s%s %.02fs (%.01fmus/sample)',
- indent,
- model.__typename,
- model.accTime,
- 1e6 * model.accTime / nbSamples))
- else
- print(string.format('%s%s %.02fs',
- indent,
- model.__typename,
- model.accTime))
+ print(string.format('%s* %s', indent, model.__typename))
+
+ 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)
+ end
+ if nbSamples then
+ s = s .. string.format(' (%.01fmus/sample)', 1e6 * t / nbSamples)
+ end
+ print(s)