Skip to content

Commit 64adae7

Browse files
Merge pull request #5 from rforzachamp821/Ryan_WorkingBranch
ZeeTerminal v1.0.0 PR (FIRST PUBLIC RELEASE AYYYY)
2 parents 750ac59 + 6ca5608 commit 64adae7

18 files changed

+603
-324
lines changed

CommandFiles/CPUStress.cpp

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,32 @@ bool bCpuStressKeyboardTermination = false;
1111

1212
extern ConfigFileSystem ConfigObjMain;
1313

14+
#include <random>
15+
1416

1517
// Worker for CPU Stress Test
1618
void CpuStressTestWorker() {
1719
long double ldStress = 1.0;
1820

1921
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);
2340
}
2441

2542
return;
@@ -30,11 +47,28 @@ void CpuBenchmarkWorker() {
3047
long double ldStress = 1.0;
3148

3249
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+
3669
nCurrentReiterationNum++;
3770
}
71+
3872
return;
3973
}
4074

0 commit comments

Comments
 (0)