Skip to content

Commit ac6ecf2

Browse files
committed
Theater image filter load test
1 parent defa51e commit ac6ecf2

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

load-test/scripts/loadTest.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ import metricsReporter from './scannerLoadTestMetrics.js';
2424
const USE_CUSTOM_METRICS = false;
2525

2626
// Change these options to increase the user goal or time to run the test.
27-
getTestOptions(
28-
/* User goal */ 1000,
27+
export const options = getTestOptions(
28+
/* User goal */ 15000,
2929
/* High load time minutes */ 4
3030
);
3131

3232
// Change this to test different code
33-
const SOURCE_TO_TEST = sources.helloWorld;
34-
const MINI_APP_TYPE = MiniAppType.CONSOLE
33+
const SOURCE_TO_TEST = sources.theaterImageFilter;
34+
const MINI_APP_TYPE = MiniAppType.THEATER;
3535

3636
// Set this to true to space out requests every REQUEST_TIME_MS milliseconds. Set to
3737
// false to send as many requests as possible.

load-test/scripts/sources.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

load-test/scripts/tokenHelpers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import { PRIVATE_KEY } from "./configuration.js";
77

88
// Generate a JWT token for the given mini app type, with random
99
// user id, teacher id and session id. The token has a time to live of 1 minute.
10+
// Note: iss of localhost is a hack to force javabuilder to use stubbed assets
1011
export function generateToken(miniAppType, sessionId) {
1112
const issuedAtTime = (Date.now() / 1000) - 3;
1213
const expirationTime = issuedAtTime + 63;
1314
const payload = {
1415
iat: issuedAtTime,
15-
iss: "load-test",
16+
iss: "localhost-studio.code.org",
1617
exp: expirationTime,
1718
uid: getRandomId(),
1819
level_id: "none",

0 commit comments

Comments
 (0)