|
5 | 5 | local Players = game:GetService("Players") |
6 | 6 | local ReplicatedStorage = game:GetService("ReplicatedStorage") |
7 | 7 |
|
8 | | -local Lync = require(ReplicatedStorage:WaitForChild("Lync")) |
9 | 8 | local Harness = require(ReplicatedStorage.Lync.bench.Harness) |
| 9 | +local Lync = require(ReplicatedStorage:WaitForChild("Lync")) |
10 | 10 | local Scenarios = require(ReplicatedStorage.Lync.bench.Scenarios) |
11 | 11 |
|
12 | 12 | local bench = Scenarios.bench |
@@ -44,25 +44,45 @@ Scenarios.handshake.ClientReady:wait() |
44 | 44 |
|
45 | 45 | -- Blink-comparable: 1000 fires/frame, 10 s, varying data ---------------- |
46 | 46 |
|
47 | | -Harness.header(string.format( |
48 | | - "Cross-library reference (s2c, %d fires/frame, %ds)", |
49 | | - bench.blinkFiresPerFrame, bench.blinkSeconds |
50 | | -)) |
| 47 | +Harness.header( |
| 48 | + string.format( |
| 49 | + "Cross-library reference (s2c, %d fires/frame, %ds)", |
| 50 | + bench.blinkFiresPerFrame, |
| 51 | + bench.blinkSeconds |
| 52 | + ) |
| 53 | +) |
51 | 54 | for _, case in Scenarios.blinkCases do |
52 | | - Harness.throughput(case.label, bench.blinkFiresPerFrame, bench.blinkSeconds, case.pool, |
53 | | - function(data) case.packet:send(data, player) end) |
| 55 | + Harness.throughput( |
| 56 | + case.label, |
| 57 | + bench.blinkFiresPerFrame, |
| 58 | + bench.blinkSeconds, |
| 59 | + case.pool, |
| 60 | + function(data) |
| 61 | + case.packet:send(data, player) |
| 62 | + end |
| 63 | + ) |
54 | 64 | task.wait(2) |
55 | 65 | end |
56 | 66 |
|
57 | 67 | -- Extended scenarios: 100 fires/frame, vary/stable pairs ---------------- |
58 | 68 |
|
59 | | -Harness.header(string.format( |
60 | | - "Extended (s2c, %d fires/frame, %ds)", |
61 | | - bench.extendedFiresPerFrame, bench.extendedSeconds |
62 | | -)) |
| 69 | +Harness.header( |
| 70 | + string.format( |
| 71 | + "Extended (s2c, %d fires/frame, %ds)", |
| 72 | + bench.extendedFiresPerFrame, |
| 73 | + bench.extendedSeconds |
| 74 | + ) |
| 75 | +) |
63 | 76 | for _, case in Scenarios.extendedCases do |
64 | | - Harness.throughput(case.label, bench.extendedFiresPerFrame, bench.extendedSeconds, case.pool, |
65 | | - function(data) case.packet:send(data, player) end) |
| 77 | + Harness.throughput( |
| 78 | + case.label, |
| 79 | + bench.extendedFiresPerFrame, |
| 80 | + bench.extendedSeconds, |
| 81 | + case.pool, |
| 82 | + function(data) |
| 83 | + case.packet:send(data, player) |
| 84 | + end |
| 85 | + ) |
66 | 86 | task.wait(1) |
67 | 87 | end |
68 | 88 |
|
|
0 commit comments