存储我自己的负载计数器 [英] Store my own load counters

查看:57
本文介绍了存储我自己的负载计数器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过单元测试项目从Visual Studio运行负载

i am running load from visual studio via unit test project

当前我无法使用TestContext.BegineTimer,因为我需要测量特定的代码行 

currently i am unable to use the TestContext.BegineTimer since i need to measure specific code lines 

是否可以将这些行的响应时间存储在文件中,并在执行结束时将其作为结果上传?

is there a way to store the response time of those lines in file and at the end of the execution to upload them as results? 

还是将它们保存为特定计数器的响应时间?

or save them as the response time for a specific counter ?

谢谢.

推荐答案

嗨micha.azran,

Hi micha.azran,

据我所知,TestContext.BeginTimer可以记录在负载测试结果中,而跟踪结果可以存储在数据库中.每当我打开测试结果时,都可以在事务结果"下看到跟踪结果.
而且我还选中了添加自定义计数器集",在效果"类别列表下,我没有找到与之相关的类别.测量特定的代码行.

As far as I know, the TestContext.BeginTimer can be recorded in Load Test Result, and the trace result can be stored in database. Whenever I open the test result, I can see the trace result under Transaction Results.
And I also check Add Custom Counter Set and under the Performance category list I don't find a category is related to  measure specific code lines.


另一种方法是使用Profile工具来帮助您收集已分析应用程序中函数调用的详细计时.
https://msdn.microsoft.com/en-us/library/dd264994.aspx#instrumentation
 
但是我仍然建议您使用TestContext类来测量项目中的特定代码行,这些代码行可以存储在数据库中,并在需要时进行检查.


Another way is using Profile instrumentation to help you collects detailed timing for the function calls in a profiled application.
https://msdn.microsoft.com/en-us/library/dd264994.aspx#instrumentation
 
But I still recommend you using TestContext class to measure specific code lines in your project, which can be stored in database and you check it whenver you want.

最好的问候,
Weiwei

Best Regards,
Weiwei


这篇关于存储我自己的负载计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆