Skip to content

Commit

Permalink
Merge pull request #33 from pagopa/load-tests-tokenizer-on-demand
Browse files Browse the repository at this point in the history
edit configuration for tokenizer on demand load test
  • Loading branch information
BenitoVisone authored Dec 20, 2023
2 parents bca0181 + 403bdbf commit 54419b5
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/08-put-token-ramping-and-constant-scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const options = {
executor: 'ramping-arrival-rate',

// Start iterations per `timeUnit`
startRate: 25,
startRate: 50,

// Start `startRate` iterations per seconds
timeUnit: '1s',
Expand All @@ -22,13 +22,13 @@ export const options = {

stages: [
// Start 50 iterations per `timeUnit` for the first minute.
{ target: 25, duration: '1m' },
{ target: 50, duration: '1m' },

// // Linearly ramp-up to starting 100 iterations per `timeUnit` over the following two minutes.
{ target: 50, duration: '2m' },
{ target: 100, duration: '2m' },

// // Continue starting 300 iterations per `timeUnit` for the following two minutes.
{ target: 150, duration: '2m' }
{ target: 300, duration: '2m' }
],
},
constant: {
Expand All @@ -38,7 +38,7 @@ export const options = {
duration: '3m',

// test rate
rate: 150,
rate: 300,

// It should start `rate` iterations per second
timeUnit: '1s',
Expand All @@ -57,7 +57,7 @@ export const options = {
executor: 'ramping-arrival-rate',

// Start iterations per `timeUnit`
startRate: 150,
startRate: 300,

// Start `startRate` iterations per seconds
timeUnit: '1s',
Expand All @@ -72,13 +72,13 @@ export const options = {

stages: [
// Start 300 iterations per `timeUnit` for four minutes.
{ target: 150, duration: '1m' },
{ target: 300, duration: '1m' },

// Linearly ramp-down to starting 100 iterations per `timeUnit` over the following two minutes.
{ target: 50, duration: '2m' },
{ target: 100, duration: '2m' },

// Continue starting 50 iterations per `timeUnit` for the following minute.
{ target: 25, duration: '1m' }
{ target: 50, duration: '1m' }
],
},
},
Expand Down Expand Up @@ -144,23 +144,14 @@ export default function () {
);

var r = http.put(url, payload, params);
var r1 = http.put(url, payload, params);

check(r, {
'status is 200': (r) => r.status === 200,
});

check(r1, {
'status is 200': (r) => r1.status === 200,
});

if (r.status === 429) {
throttling.add(1);
console.log(`Status ${r.status}`);
}
if (r1.status === 429) {
throttling.add(1);
console.log(`Status ${r1.status}`);
}

}

0 comments on commit 54419b5

Please sign in to comment.