Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

profiling in VS 2012

I'm Using Win 8 x64 and setup Visual Studio Ultimate 2012

I run a C# project

and want to run the profiling to my project

when I start profiling It give me

' Profiling started.

Profiling process ID 848 (testing).

'848' is not a valid Process ID.

Profiler stopping.

PRF0025: No data was collected.

Profiling complete. '

I'm new in Profiling

I Google for this problem and just found some tell the problem with WIN 8 http://social.msdn.microsoft.com/Forums/en-US/vstsprofiler/thread/c609d76c-be22-4ffb-858c-73ccab591a78/

but Now what I supposed to do ?

like image 869
usr Avatar asked Dec 04 '22 11:12

usr


2 Answers

This will happen when your program quits too soon, before the profiler had a chance to collect any samples. Perhaps somewhat typical when you kick the tires to see how it works but haven't written any real code yet that can be profiled in a meaningful way.

For very short programs with little actual code, be sure to change the profiling mode. Use Analyze + Performance Wizard and switch from "sampling" to "instrumentation" mode. Instrumentation mode slows down the program a great deal but is a lot more accurate for very short programs.

like image 71
Hans Passant Avatar answered Dec 17 '22 12:12

Hans Passant


Are you sure the process is still running when the profiler starts? Looking at the message about the process ID not being valid, it sounds like the process might have exited before the profiler had a chance to collect anything.

like image 34
mandaleeka Avatar answered Dec 17 '22 13:12

mandaleeka