-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add initial load testing script
- Loading branch information
1 parent
1022f30
commit 5a1f8cb
Showing
6 changed files
with
872 additions
and
0 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
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,20 @@ | ||
# Inferable Load Testing | ||
|
||
This directory contains load tests for the Inferable Control Plane using k6. | ||
|
||
## Prerequisites | ||
|
||
- Node.js | ||
- k6 ([Installation Guide](https://k6.io/docs/get-started/installation/)) | ||
|
||
## Running the Tests | ||
|
||
1. First, start the machine service: | ||
```bash | ||
npm run machine:start | ||
``` | ||
|
||
2. In a new terminal, run the k6 tests: | ||
```bash | ||
npm run test: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,18 @@ | ||
import { Inferable } from 'inferable' | ||
|
||
const API_SECRET = process.env.INFERABLE_TEST_API_SECRET | ||
|
||
const client = new Inferable({ | ||
apiSecret: API_SECRET, | ||
}) | ||
|
||
client.default.register({ | ||
func: () => { | ||
return { | ||
word: "needle" | ||
} | ||
}, | ||
name: "searchHaystack", | ||
}) | ||
|
||
client.default.start() |
Oops, something went wrong.