mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-02 13:53:12 +00:00
* chore: add throughput reliability tests * chore: add capability to run all * chore: add network-latency reliability tests * chore: add network-latency reliability tests * chore: add other network reliability tests * chore: add other network reliability tests * chore: fix tc cleanup * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: refactor common code * chore: fix * chore: fix tests * chore: fix tests
33 lines
862 B
TypeScript
33 lines
862 B
TypeScript
import {
|
|
generateRandomString,
|
|
printSizeDistributionReport,
|
|
runTest,
|
|
setupTest
|
|
} from "./sharedTestUtils.js";
|
|
|
|
const sizes = [10, 100, 1000, 10_000, 100_000]; // bytes
|
|
|
|
describe("Throughput Sanity Checks - Different Message Sizes", function () {
|
|
const testDurationMs = 20 * 60 * 1000; // 20 minute
|
|
const testContext: { report?: any } = {};
|
|
|
|
setupTest(this, testContext);
|
|
|
|
afterEach(async () => {
|
|
if (testContext.report) {
|
|
printSizeDistributionReport(testContext.report);
|
|
}
|
|
});
|
|
|
|
runTest({
|
|
testContext: testContext,
|
|
testDurationMs: testDurationMs,
|
|
testName: "Throughput Sanity Checks - Different Message Sizes",
|
|
messageGenerator: (_messageId: number) => {
|
|
const size = sizes[Math.floor(Math.random() * sizes.length)];
|
|
return generateRandomString(size);
|
|
},
|
|
delayBetweenMessagesMs: 400
|
|
});
|
|
});
|