Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-7038 - advanced load testing #5125

Closed
wants to merge 82 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
7442380
initial commit
hoeppner-dataport Jul 19, 2024
02db6d0
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Jul 19, 2024
080d5bc
implementation of scenario-user-configurations
hoeppner-dataport Jul 19, 2024
cf03e65
chore: change bucket maxAgeSeconds from 600 to 30
hoeppner-dataport Jul 19, 2024
aa42034
fix: connecting when multiple collaboration pods
hoeppner-dataport Jul 22, 2024
e9f140c
fix: user gauge naming
hoeppner-dataport Jul 22, 2024
789db0d
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Jul 29, 2024
ac71936
chore: try redis again
hoeppner-dataport Jul 29, 2024
f3c5202
chore: add redis error handler
hoeppner-dataport Jul 29, 2024
08ab990
chore: get redis uri from configuration
hoeppner-dataport Jul 29, 2024
89d6aa4
fix: replace redis- with mongoIoAdapter again
hoeppner-dataport Jul 29, 2024
08ad4ad
chore: cleanup
hoeppner-dataport Aug 2, 2024
03c49b0
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 2, 2024
f946320
chore: redisIoAdapter typing
hoeppner-dataport Aug 5, 2024
3124670
exclude load-tests from regular tests
hoeppner-dataport Aug 5, 2024
da84677
add loadtests to ignore list of jest config
hoeppner-dataport Aug 5, 2024
c16aabe
exclude load test from automatic tests
hoeppner-dataport Aug 5, 2024
8d0d7dd
fix tests
hoeppner-dataport Aug 5, 2024
93458f6
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 5, 2024
c80862c
fix formatDate test timezone issue
hoeppner-dataport Aug 5, 2024
193cf05
fix formatData and tests
hoeppner-dataport Aug 5, 2024
c4abb3a
reset jest.config deny of .load.spec.ts
hoeppner-dataport Aug 7, 2024
e8c874f
adapt logging and amount of viewer classes
hoeppner-dataport Aug 7, 2024
f9373eb
implement rampUp
hoeppner-dataport Aug 8, 2024
36218f2
switchToRedis
hoeppner-dataport Aug 8, 2024
e68d2b1
add logging to redisIoAdapter
hoeppner-dataport Aug 8, 2024
96d2ca3
chore: fix test
hoeppner-dataport Aug 8, 2024
51bc665
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 8, 2024
0d49157
chore: fix tests
hoeppner-dataport Aug 8, 2024
3ad80ad
chore: fix tests
hoeppner-dataport Aug 8, 2024
e7d3c8f
fix legacy logger
hoeppner-dataport Aug 8, 2024
5d33799
chore: replace legacyLogger with console.log
hoeppner-dataport Aug 8, 2024
5dfd7df
fix: redisIoAdapter
hoeppner-dataport Aug 8, 2024
eb6df25
fix redis adapter
hoeppner-dataport Aug 8, 2024
1c06bbe
finetune redisIoAdapter
hoeppner-dataport Aug 8, 2024
4ead105
disable fetch board
hoeppner-dataport Aug 8, 2024
c68c04c
chore: remove unneeded async keyword
hoeppner-dataport Aug 8, 2024
b00f2b9
chore: remove loging
hoeppner-dataport Aug 8, 2024
9006d50
redis again
hoeppner-dataport Aug 8, 2024
ae5c318
skip: redis connect
hoeppner-dataport Aug 9, 2024
489fd5d
return promise from connectToRedis
hoeppner-dataport Aug 9, 2024
b8a0ffe
remove unneeded connect-calls
hoeppner-dataport Aug 9, 2024
32d57f8
improve stats output during testrun
hoeppner-dataport Aug 9, 2024
2baa9ca
switch back to other waitSuccess function
hoeppner-dataport Aug 9, 2024
1df32a3
configurable class counts
hoeppner-dataport Aug 9, 2024
bbc91cc
minor change to stats
hoeppner-dataport Aug 9, 2024
2d25cf4
remove fetchCard from tests
hoeppner-dataport Aug 9, 2024
c8f4d3d
switch to log based success
hoeppner-dataport Aug 9, 2024
7d6e2b7
optimization aproach create-column
hoeppner-dataport Aug 9, 2024
d533dc2
disable checkPermission for createColumn
hoeppner-dataport Aug 9, 2024
ae71245
fix: socket connect before first action
hoeppner-dataport Aug 9, 2024
3208162
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 9, 2024
8ea6475
chore: use enums
hoeppner-dataport Aug 12, 2024
eb1f643
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 12, 2024
f67cd49
make ioAdapter configurable through env variable
hoeppner-dataport Aug 12, 2024
1a3b68c
chore: fix boardUc test
hoeppner-dataport Aug 12, 2024
ba62e11
add logging for server-side emitted actions
hoeppner-dataport Aug 12, 2024
1915123
improved connection handling
hoeppner-dataport Aug 12, 2024
7413eb5
chore: finetuning timeouts
hoeppner-dataport Aug 12, 2024
f16cb7d
chore: refactorings
hoeppner-dataport Aug 14, 2024
9bdbb20
make connection amount configurable
hoeppner-dataport Aug 14, 2024
2879403
chore: further refactorings
hoeppner-dataport Aug 14, 2024
0bbadaa
chore: small changes
hoeppner-dataport Aug 14, 2024
c18d04a
refactoring
hoeppner-dataport Aug 15, 2024
5c59a32
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 15, 2024
9cb9546
chore: fix some tests
hoeppner-dataport Aug 16, 2024
1276c4d
chore: test fixes
hoeppner-dataport Aug 16, 2024
b9f2c69
chore: fix naming
hoeppner-dataport Aug 16, 2024
952e0a5
chore: added testfile
hoeppner-dataport Aug 16, 2024
b49bfb0
chore: added tests
hoeppner-dataport Aug 16, 2024
addec1b
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 16, 2024
abbab59
chore: tests
hoeppner-dataport Aug 16, 2024
e0a6d4f
chore: additional tests
hoeppner-dataport Aug 19, 2024
48da98f
chore: increase test coverage
hoeppner-dataport Aug 19, 2024
1f63809
chore: fix tests
hoeppner-dataport Aug 19, 2024
b2ba65d
chore: fix tests
hoeppner-dataport Aug 19, 2024
3fbed62
chore: add tests
hoeppner-dataport Aug 19, 2024
f6eb1de
Merge branch 'main' of github.com:hpi-schul-cloud/schulcloud-server i…
hoeppner-dataport Aug 19, 2024
6c8dc13
chore: remove unfinished test
hoeppner-dataport Aug 19, 2024
747b3d7
chore: add test
hoeppner-dataport Aug 20, 2024
857fa04
chore: add tests
hoeppner-dataport Aug 20, 2024
9129ac2
chore: fix loadtest-runner coverage
hoeppner-dataport Aug 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
minor change to stats
  • Loading branch information
hoeppner-dataport committed Aug 9, 2024
commit bbc91cce6e1e311ebbcfe94b2e370d1c92df55b0
Original file line number Diff line number Diff line change
@@ -162,19 +162,22 @@
};

let intervalHandle: NodeJS.Timeout | undefined;
const startTime = performance.now();
const showStats = () => {
const seconds = Math.ceil((performance.now() - startTime) / 1000);
const clients = getClientCount();
const errors = getErrorCount();
console.log(`${seconds}s - ${clients} clients connected - ${errors} errors`);
};
const startRegularStats = () => {
const startTime = performance.now();
intervalHandle = setInterval(() => {
const seconds = Math.ceil((performance.now() - startTime) / 1000);
const clients = getClientCount();
const errors = getErrorCount();
console.log(`${seconds}s - ${clients} clients connected - ${errors} errors`);
}, 5000);
intervalHandle = setInterval(showStats, 5000);
};

const stopRegularStats = () => {
if (intervalHandle) {
clearInterval(intervalHandle);
}
showStats();
};

const runConfigurations = async ({
@@ -186,7 +189,7 @@
courseId: string;
configurations: ClassDefinitionWithAmount[];
}) => {
const startTime = formatDate(new Date());

Check failure on line 192 in apps/server/src/modules/board/loadtest/board-collaboration.load.spec.ts

GitHub Actions / nest_lint

'startTime' is already declared in the upper scope on line 165 column 8
const urls = getUrlConfiguration(target);
const classes = createSeveralClasses(configurations);
const boardIds = await createBoards(urls.api, courseId, classes.length);
@@ -202,8 +205,17 @@
{ responseTimes: [], errors: [] } as { responseTimes: ResponseTimeRecord[]; errors: string[] }
);
const endTime = formatDate(new Date());
writeProtocol({ startTime, endTime, configurations, responseTimes: getStats(responseTimes), errors });
stopRegularStats();
const protocol = {
startTime,
endTime,
configurations,
responseTimes: getStats(responseTimes),
errorCount: errors.length,
errors,
};
writeProtocol(protocol);
console.log(JSON.stringify(protocol, null, 2));
};

it('should run a basic load test', async () => {
Loading