What do “Self” and “# Self” mean in the Time Profi

2020-05-30 06:48发布

The documentation just says it means "the number of time the symbol calls itself", but what does this mean? And what does "# Self" mean?

When I use Instruments, if "# Self" is equal to 100, then "Self" is also 100.0.

1条回答
小情绪 Triste *
2楼-- · 2020-05-30 07:47

I think the documentation you read must be incorrect.

Self in the Time Profiler refers to the amount of time spent in the given function itself, excluding time spent in other methods that it calls.

Self % is the same thing but expressed as a percentage of the total running time.

# Self is the number of actual profiler samples that hit this function or method. The Time Profiler samples every 1 ms by default, so this number will often be the same as the Self value.

查看更多
登录 后发表回答