Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1170 from botpress/wip/11.1
feat: release v11.1
- Loading branch information
Showing
185 changed files
with
6,528 additions
and
4,999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Botpress Benchmark | ||
|
||
##How to run | ||
|
||
Botpress has to be running | ||
|
||
``` | ||
yarn | ||
yarn start | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
let testId = null | ||
|
||
exports.setupTestId = function setupTestId(context, events, done) { | ||
if (!testId) { | ||
testId = Math.random() | ||
.toString(16) | ||
.substr(2) | ||
} | ||
context.vars['testId'] = testId | ||
return done() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "bench", | ||
"version": "1.0.0", | ||
"description": "Benchmark Utility for Botpress Server", | ||
"main": "index.js", | ||
"author": "Botpress, Inc.", | ||
"license": "AGPL-3.0", | ||
"private": true, | ||
"scripts": { | ||
"web": "artillery run ./stress_channel_web.yml", | ||
"api": "artillery run ./stress_channel_api.yml" | ||
}, | ||
"dependencies": { | ||
"artillery": "^1.6.0-25" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
config: | ||
target: 'http://localhost:3000' | ||
phases: | ||
- duration: 10 # lasts for 'X' seconds | ||
arrivalRate: 1 # 'X' new users per second | ||
payload: | ||
path: 'users.csv' | ||
fields: ['prefix', 'uuid'] | ||
order: 'sequence' | ||
processor: './functions.js' | ||
scenarios: | ||
- name: Each user sends 'X' messages to channel-api | ||
flow: | ||
- log: Testing channel-api | ||
- function: 'setupTestId' | ||
- loop: | ||
- post: | ||
url: '/api/v1/bots/welcome-bot/converse/{{ prefix }}{{ testId }}_{{ uuid }}' | ||
json: | ||
type: 'text' | ||
text: 'U{{ testId }}_{{ uuid }}|M{{ $loopCount }}' | ||
count: 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
config: | ||
target: 'http://localhost:3000' | ||
phases: | ||
- duration: 10 # lasts for 'X' seconds | ||
arrivalRate: 1 # 'X' new users per second | ||
payload: | ||
path: 'users.csv' | ||
fields: ['prefix', 'uuid'] | ||
order: 'sequence' | ||
processor: './functions.js' | ||
scenarios: | ||
- name: Each user sends 'X' messages to channel-web | ||
flow: | ||
- log: Testing channel-web | ||
- function: 'setupTestId' | ||
- loop: | ||
- post: | ||
url: '/api/v1/bots/welcome-bot/mod/channel-web/messages/{{ prefix }}{{ testId }}_{{ uuid }}' | ||
json: | ||
type: 'text' | ||
text: 'U{{ testId }}_{{ uuid }}|M{{ $loopCount }}' | ||
count: 50 |
Oops, something went wrong.