Prepare fixtures
This commit is contained in:
parent
797e5ea192
commit
9c94356263
6021 changed files with 722805 additions and 22 deletions
60
kf_sources/PerformanceTest/Classes/PerformanceTest.uc
Normal file
60
kf_sources/PerformanceTest/Classes/PerformanceTest.uc
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
class PerformanceTest extends Mutator;
|
||||
|
||||
var int counter;
|
||||
var int sampleSize;
|
||||
var array<int> groups;
|
||||
var array<float> outliers;
|
||||
|
||||
public function PostBeginPlay()
|
||||
{
|
||||
groups[0] = 0;
|
||||
groups.length = 20;
|
||||
}
|
||||
|
||||
public function Tick(float delta)
|
||||
{
|
||||
local int i;
|
||||
local bool added;
|
||||
local float increment, nextBreakPoint;
|
||||
local string output;
|
||||
delta *= 1000;
|
||||
increment = (0.6 * (1000/30)) / groups.length;
|
||||
nextBreakPoint = (1000/30) + increment;
|
||||
for (i = 0; i < groups.length; i += 1)
|
||||
{
|
||||
if (delta <= nextBreakPoint)
|
||||
{
|
||||
groups[i] = groups[i] + 1;
|
||||
added = true;
|
||||
sampleSize += 1;
|
||||
break;
|
||||
}
|
||||
nextBreakPoint += increment;
|
||||
}
|
||||
if (!added) {
|
||||
outliers[outliers.length] = delta;
|
||||
}
|
||||
if (counter % 180 == 0)
|
||||
{
|
||||
output = "Slowdowns: ";
|
||||
for (i = 0; i < groups.length; i += 1) {
|
||||
output $= (100 * float(groups[i]) / sampleSize) $ "/";
|
||||
}
|
||||
Log(output);
|
||||
output = "Slowdowns (count): ";
|
||||
for (i = 0; i < groups.length; i += 1) {
|
||||
output $= groups[i] $ "/";
|
||||
}
|
||||
Log(output);
|
||||
output = "Outliers: ";
|
||||
for (i = 0; i < outliers.length; i += 1) {
|
||||
output $= outliers[i] $ "/";
|
||||
}
|
||||
Log(output);
|
||||
}
|
||||
counter += 1;
|
||||
}
|
||||
|
||||
defaultproperties
|
||||
{
|
||||
}
|
||||
7
kf_sources/PerformanceTest/Classes/index.html
Normal file
7
kf_sources/PerformanceTest/Classes/index.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/PerformanceTest/Classes/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/PerformanceTest/Classes/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="PerformanceTest.uc">PerformanceTest.uc</a> 08-Dec-2021 13:33 1427
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
7
kf_sources/PerformanceTest/index.html
Normal file
7
kf_sources/PerformanceTest/index.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<head><title>Index of /kf_sources/PerformanceTest/</title></head>
|
||||
<body>
|
||||
<h1>Index of /kf_sources/PerformanceTest/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="Classes/">Classes/</a> 29-Jun-2025 19:43 -
|
||||
</pre><hr></body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue