Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Performance testing vbs usage (1)

Shulou Source: shulou.com Published: 2022-06-03 06:06:41 10月04日 Update

This article is from my csdn: http://blog.csdn.net/jiazurongyu/article/details/7555815

Here is an example of checking Cpu in a performance test.

Cpu performance is also common, easy to analyze, and can be viewed using the one that comes with wins. But it does not refer to the resource manager.

Win+R key, perfmon open.

Part of the Cpu performance checkpoint is:

Processor processor

The process of the Process object

Thread thread object

It mainly starts with the processor, needless to say why, Cpu.

Use the performance Monitor to focus on important Cpu performance.

Divide the parts of% processor Time that need to be monitored into two levels, in which the second level "keyword" is printed.

The pseudo code is as follows:

01.if (Process.%processor Time (_ Total) > 70%) 02.Command "alert" dataTime Processj thread?03.if (Process.%processor Time (_ Total) > 90%) 04.then05. Command "important" dataTime Processj thread?06.else07. Command

Then save the above in a log.txt file.

Then use this vbs to implement:

01.Set log = CreateObject ("Scripting.FileSystemObject") 02.s = log.OpenTextFile ("\ log.text"). ReadAll () 03.If InStr (s, "important") 0 Then04. Log.DeleteFolder "\ log.text" 05.Else06. Log.CreateFolder "\ crash.text" 07.End If

In the actual check, the processor's cpu can be more than 100. the multi-core server and the cpu processor time are caused by the sum of the processor time, so we don't have to pay too much attention to the data, we need to verify other parameters according to this data.

Tags: Performance processor processing important check no object data part test needless to say code example keyword keyword reason parameter actual common reference Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn MariaDB OPPO Reno Shulou Technology