Prepare fixtures

This commit is contained in:
dkanus 2026-07-14 20:27:09 +07:00
commit 9c94356263
6021 changed files with 722805 additions and 22 deletions

View 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
{
}

View 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>