3

I am using Visual Studio 2013 to execute c++ code.I want to see the execution time of my code.

I performed the following activities

Tools -> Options -> Projects and solutions ->VC++ Project Settings->Build timing->yes

**Tools -> Options -> Projects and Solutions -> Build and Run and set the MSBuild project build output verbosity to "Normal"** 

but it's not working for me.

Laxmi Kadariya
  • 1,103
  • 1
  • 14
  • 34

2 Answers2

1

I use Squared Infinity's VS Commands Visual Studio extension which has an option to display a build summary in the output window that lists the time each project took to build.

Chris Morgan
  • 1,074
  • 11
  • 11
0

If you want compilation time, as the title of your post suggests, you're in the right direction. You may want to look at this thread for further help.

If you want to know how your code performs at runtime, that's a different story. You can either insert use datetime variables along with print commands in your code to see the elapsed time in a console window (not very pretty or efficient) or use a profiling tool (much better IMHO).

Personally I use RedGate's ANTS Performance Profiler and am quite pleased with it. :) I should mention I never tried it with managed C++ but it should work just fine.

Visual Studio also has a built-in profiling tool, but I never tried it myself. You might want to take a look at it.

Hope that helps.

Community
  • 1
  • 1
Crono
  • 10,211
  • 6
  • 43
  • 75