问题
The profiler in Visual Studio 2010 is great and all, but I can't see what unit the time results in the instrumentation profiler is reported in. The results table is just numbers and I can't find anywhere in the UI where I can set the unit (as there is in e.g. AQTime).
I've read through the "Understanding Instrumentation Data" section on MSDN but it just uses time to explain the numbers. ("The total time that was spent executing...")
Does anyone know what unit (milliseconds, microseconds, ticks, etc.) that is used? I'm guessing milliseconds but I'm not 100% sure.
回答1:
The time is in milliseconds (msec) or processor cycles (ticks).
According to the MSDN docs (It refers to vs2008 but it's still the same):
The time in milliseconds (msec) or processor cycles (ticks) that was spent in the direct execution of this function, excluding time spent in child functions called by this function.
回答2:
I found there's a tooltip on the column headers on the result table which states "The time spent in this function (msec)" which confirms that it is indeed milliseconds.
来源:https://stackoverflow.com/questions/8502578/what-time-unit-is-used-in-the-visual-studio-2010-instrumentation-profiler