<small id='aTcgI'></small><noframes id='aTcgI'>

    <legend id='aTcgI'><style id='aTcgI'><dir id='aTcgI'><q id='aTcgI'></q></dir></style></legend>

    • <bdo id='aTcgI'></bdo><ul id='aTcgI'></ul>
  • <i id='aTcgI'><tr id='aTcgI'><dt id='aTcgI'><q id='aTcgI'><span id='aTcgI'><b id='aTcgI'><form id='aTcgI'><ins id='aTcgI'></ins><ul id='aTcgI'></ul><sub id='aTcgI'></sub></form><legend id='aTcgI'></legend><bdo id='aTcgI'><pre id='aTcgI'><center id='aTcgI'></center></pre></bdo></b><th id='aTcgI'></th></span></q></dt></tr></i><div id='aTcgI'><tfoot id='aTcgI'></tfoot><dl id='aTcgI'><fieldset id='aTcgI'></fieldset></dl></div>

      <tfoot id='aTcgI'></tfoot>

      1. 什么是非常简单的 C++ 分析器 (VC++)?

        What#39;s a very easy C++ profiler (VC++)?(什么是非常简单的 C++ 分析器 (VC++)?)
            <bdo id='9b8bn'></bdo><ul id='9b8bn'></ul>
            <i id='9b8bn'><tr id='9b8bn'><dt id='9b8bn'><q id='9b8bn'><span id='9b8bn'><b id='9b8bn'><form id='9b8bn'><ins id='9b8bn'></ins><ul id='9b8bn'></ul><sub id='9b8bn'></sub></form><legend id='9b8bn'></legend><bdo id='9b8bn'><pre id='9b8bn'><center id='9b8bn'></center></pre></bdo></b><th id='9b8bn'></th></span></q></dt></tr></i><div id='9b8bn'><tfoot id='9b8bn'></tfoot><dl id='9b8bn'><fieldset id='9b8bn'></fieldset></dl></div>
            <tfoot id='9b8bn'></tfoot>
            • <small id='9b8bn'></small><noframes id='9b8bn'>

                  <tbody id='9b8bn'></tbody>
                <legend id='9b8bn'><style id='9b8bn'><dir id='9b8bn'><q id='9b8bn'></q></dir></style></legend>

                1. 本文介绍了什么是非常简单的 C++ 分析器 (VC++)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我过去使用过一些分析器,但从未发现它们特别容易.也许我挑了不好的,也许我真的不知道我在期待什么!但我想知道是否有任何标准"分析器可以简单地插入并工作?我不相信我需要大量详细的报告,只是为了找出主要的黑点.在这一点上,易用性对我来说更重要.

                  I've used a few profilers in the past and never found them particularly easy. Maybe I picked bad ones, maybe I didn't really know what I was expecting! But I'd like to know if there are any 'standard' profilers which simply drop in and work? I don't believe I need massively fine-detailed reports, just to pick up major black-spots. Ease of use is more important to me at this point.

                  我们使用的是 VC++ 2008(我个人运行标准版).我不认为 IDE 中有任何用于此的工具,从主菜单中看不到任何工具?

                  It's VC++ 2008 we're using (I run standard edition personally). I don't suppose there are any tools in the IDE for this, I can't see any from looking at the main menus?

                  推荐答案

                  VS 内置:

                  如果您有团队版,则可以使用 Visual Studio 分析器.

                  If you have team edition you can use the Visual Studio profiler.

                  其他选项:

                  否则检查此线程.

                  轻松创建自己的:

                  我个人使用基于 Win32 API 的内部构建的查询性能计数器.您可以在一百行或更少的代码中制作出漂亮且易于使用的东西.

                  I personally use an internally built one based on the Win32 API QueryPerformanceCounter. You can make something nice and easy to use within a hundred lines of code or less.

                  过程很简单:在您要分析的每个函数的顶部创建一个宏,称为 PROFILE_FUNC(),并将添加到内部管理的统计信息中.然后有另一个名为 PROFILE_DUMP() 的宏,它将输出转储到文本文档.

                  The process is simple: create a macro at the top of each function that you want to profile called PROFILE_FUNC() and that will add to internally managed stats. Then have another macro called PROFILE_DUMP() which will dump the outputs to a text document.

                  PROFILE_FUNC() 创建一个对象,该对象将使用 RAII 来记录该对象被销毁之前的时间量.此 RAII 对象的构造函数和析构函数都将调用 QueryPerformanceCounter.您也可以在代码中保留这些行并通过 #define PROFILING_ON

                  PROFILE_FUNC() creates an object that will use RAII to log the amount of time until the object is destroyed. Both the constructor of this RAII object and the destructor will call QueryPerformanceCounter. You could also leave these lines in your code and control the behavior via a #define PROFILING_ON

                  这篇关于什么是非常简单的 C++ 分析器 (VC++)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Consistent pseudo-random numbers across platforms(跨平台一致的伪随机数)
                  Vary range of uniform_int_distribution(改变uniform_int_distribution的范围)
                  What is a seed in terms of generating a random number?(就生成随机数而言,种子是什么?)
                  Is 1.0 a valid output from std::generate_canonical?(1.0 是 std::generate_canonical 的有效输出吗?)
                  Getting big random numbers in C/C++(在 C/C++ 中获取大随机数)
                  What is the best way to generate random numbers in C++?(在 C++ 中生成随机数的最佳方法是什么?)
                2. <i id='zy8eI'><tr id='zy8eI'><dt id='zy8eI'><q id='zy8eI'><span id='zy8eI'><b id='zy8eI'><form id='zy8eI'><ins id='zy8eI'></ins><ul id='zy8eI'></ul><sub id='zy8eI'></sub></form><legend id='zy8eI'></legend><bdo id='zy8eI'><pre id='zy8eI'><center id='zy8eI'></center></pre></bdo></b><th id='zy8eI'></th></span></q></dt></tr></i><div id='zy8eI'><tfoot id='zy8eI'></tfoot><dl id='zy8eI'><fieldset id='zy8eI'></fieldset></dl></div>

                  <small id='zy8eI'></small><noframes id='zy8eI'>

                      <bdo id='zy8eI'></bdo><ul id='zy8eI'></ul>

                        • <legend id='zy8eI'><style id='zy8eI'><dir id='zy8eI'><q id='zy8eI'></q></dir></style></legend>

                            <tfoot id='zy8eI'></tfoot>
                              <tbody id='zy8eI'></tbody>