软件测试论坛

 找回密码
 软件测试论坛注册页
查看: 2826|回复: 0

[压力测试] 自定义计数器和其报警上线

  [复制链接]
发表于 2009-7-16 16:39:00 | 显示全部楼层 |阅读模式
软件测试工程师就业班马上开班
方法:
用记事本或者VS开发工具写上自己所要添加的内容,如:
<?xml version = "1.0" encoding = "utf-8"?>
<CounterSet Name = "Custom" CounterSetType = "Custom Set">

<CounterCategories>


<CounterCategory Name = "Memory">


<Counter>



<Counter Name = "% Committed Bytes In Use" />


<Counter Name ="Available Mbytes" />


</Counter>


</CounterCategory>


<CounterCategory>


<Counters>


<Counter Name = "% Processor Time">


<ThresholdRules>


<ThresholdRule Classname = "Microsft.VisualStudio.TestTools.WebStress.Rules.ThresholdRuleCompareConstant,Microsft.VisualStudio.QualityTools.LoadTest">


<RuleParameters>


<RuleParameters Name = "AlertIfOver" Value = "True" />



<RuleParameters Name = "WarningThreshold" Value = "80" />


<RuleParameters Name = "CriticalThreshold" Value = "90" />


</RuleParameters>


</ThresholdRule>


</ThresholdRules>


</Counter>


</Counters>


<Instances>


<Instance Name = "*"/>


</Instances>


</CounterCategory>


</CounterCategories>

</CounterSet>
然后保存为customcounter.CounterSet,并拷贝至【驱动盘】:\Microsoft Visual Studio 9.0\Common7\IDE\Templates\LoadTest\CounterSets\zh下,然后启动VSTS添加负载测试,在计数器集中就能显示所添加的计数器

本版积分规则

Archiver|手机版|小黑屋|领测软件测试网 ( 京ICP备10010545号-5 )

GMT+8, 2021-10-25 03:50 , Processed in 0.119138 second(s), 9 queries , Xcache On.

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表