@@ -11,15 +11,32 @@ bool bCpuStressKeyboardTermination = false;
11
11
12
12
extern ConfigFileSystem ConfigObjMain;
13
13
14
+ #include < random>
15
+
14
16
15
17
// Worker for CPU Stress Test
16
18
void CpuStressTestWorker () {
17
19
long double ldStress = 1.0 ;
18
20
19
21
while (!StopCpuStress) {
20
- ldStress *= RandNumld (0 , 5 );
21
- ldStress /= RandNumld (0.00000001 , 5 );
22
- ldStress += RandNumld (0 , 5 );
22
+ // 15 rounds of random number generation
23
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
24
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
25
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
26
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
27
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
28
+
29
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
30
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
31
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
32
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
33
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
34
+
35
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
36
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
37
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
38
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
39
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
23
40
}
24
41
25
42
return ;
@@ -30,11 +47,28 @@ void CpuBenchmarkWorker() {
30
47
long double ldStress = 1.0 ;
31
48
32
49
while (!StopCpuStress) {
33
- ldStress *= RandNumld (0 , 5 );
34
- ldStress /= RandNumld (0.00000001 , 5 );
35
- ldStress += RandNumld (0 , 5 );
50
+ // 15 rounds of random number generation
51
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
52
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
53
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
54
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
55
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
56
+
57
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
58
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
59
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
60
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
61
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
62
+
63
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
64
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
65
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
66
+ ldStress *= RandNumld (M_PI * 2 , 0.000000001 );
67
+ ldStress /= RandNumld (M_PI * 2 , 0.000000001 );
68
+
36
69
nCurrentReiterationNum++;
37
70
}
71
+
38
72
return ;
39
73
}
40
74
0 commit comments