visual studio编译时插件

时间:2022-10-17 05:31:10

Is there a visual studio plug-in that will track how long it takes to compile and run a project?

是否有可视化工作室插件,可以跟踪编译和运行项目所需的时间?

Basically I'm trying to make a case to get faster computers for the development department. It seems like it takes a minute or so every time I want to run/debug, so I want a way to track how long ever day/week/month my computer spends compiling.

基本上我正试图为开发部门提供更快的计算机。似乎每次我想要运行/调试都需要一分钟左右,所以我想要一种方法来跟踪我的计算机每天/每周/每月的编译时间。

We are using visual studio 2005, .net 2.0 in C#.

我们在C#中使用visual studio 2005,.net 2.0。

2 个解决方案

#1


For C++, you can turn on build timing, in VS2005, this is under Tools > Options > Projects and Solutions > VC++ Project Settings > Build Timing. Not sure if this applies to other languages. This only times each individual build and spits the result to the output window. If you want to track statistics, then you'd need to parse this and store it somehow.

对于C ++,您可以在VS2005中启用构建计时,这可以在工具>选项>项目和解决方案> VC ++项目设置>构建计时下进行。不确定这是否适用于其他语言。这仅对每个单独构建并将结果吐出到输出窗口。如果你想跟踪统计数据,那么你需要解析它并以某种方式存储它。

#2


You could probally do this very simply using Build Event Macros. One implementation might be to have it execute a small script file which can record the date and time and event to a file, then you can process that file to calculate the ammount of time compiling.

您可以使用构建事件宏来简单地执行此操作。一种实现可能是让它执行一个小脚本文件,它可以将日期和时间以及事件记录到文件中,然后您可以处理该文件以计算编译时间。

If you have multiple projects in a solution which is preety much the norm these days perhaps a quick custom msbuild task, and you can edit the solution to call that task at the start and end of the process.

如果您在解决方案中有多个项目,那么这些日子可能是一个快速的自定义msbuild任务,您可以编辑解决方案以在流程的开始和结束时调用该任务。

#1


For C++, you can turn on build timing, in VS2005, this is under Tools > Options > Projects and Solutions > VC++ Project Settings > Build Timing. Not sure if this applies to other languages. This only times each individual build and spits the result to the output window. If you want to track statistics, then you'd need to parse this and store it somehow.

对于C ++,您可以在VS2005中启用构建计时,这可以在工具>选项>项目和解决方案> VC ++项目设置>构建计时下进行。不确定这是否适用于其他语言。这仅对每个单独构建并将结果吐出到输出窗口。如果你想跟踪统计数据,那么你需要解析它并以某种方式存储它。

#2


You could probally do this very simply using Build Event Macros. One implementation might be to have it execute a small script file which can record the date and time and event to a file, then you can process that file to calculate the ammount of time compiling.

您可以使用构建事件宏来简单地执行此操作。一种实现可能是让它执行一个小脚本文件,它可以将日期和时间以及事件记录到文件中,然后您可以处理该文件以计算编译时间。

If you have multiple projects in a solution which is preety much the norm these days perhaps a quick custom msbuild task, and you can edit the solution to call that task at the start and end of the process.

如果您在解决方案中有多个项目,那么这些日子可能是一个快速的自定义msbuild任务,您可以编辑解决方案以在流程的开始和结束时调用该任务。