定时程序执行

发布于 2024-08-26 09:34:14 字数 77 浏览 2 评论 0原文

我有一个用 C 编写的项目,我想知道是否有一种简单的方法可以在 Windows 下分析其执行时间和内存使用情况。

提前致谢。

I have a project written in C and I would like to know if there is a simple way to profile its execution time and memory usage under Windows.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

终难遇 2024-09-02 09:34:15

计时信息很简单:创建一个调用程序的.bat文件,在程序启动之前和结束之后输出当前系统时间...伪代码如下:

print system time
execute program
print system time

至于内存消耗,我想说它有点复杂,尽管绝对可行。您可以尝试这些行。 。

Timing information is easy enough: create a .bat file invoking the program, output the current system time before the program starts and after it ends...something like this in pseudocode:

print system time
execute program
print system time

As for memory consumption, I would say it's a bit more involved, although definitely doable. You might try something along these lines...

心的憧憬 2024-09-02 09:34:14

您可以启动进程监视器,运行您的程序,然后返回到 procmon 并使用工具/进程活动摘要来概述程序使用的时间和内存。

You can launch process monitor, run your program, and then go back to procmon and use Tools/Process Activity Summary to have an overview of the time and memory used by your program.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文