You need to clone the repo from here [email protected]:LF-Engineering/lfx-insights-perf-testing.git
.
$ git clone [email protected]:LF-Engineering/lfx-insights-perf-testing.git
$ npm install -g yarn
$ yarn install
Param | Obligatory | Default |
---|---|---|
CUBE_AUTH | YES | - |
CUBE_URL | YES | - |
SF_ACCOUNT | YES | - |
SF_DB_NAME | YES | - |
SF_PASS | YES | - |
SF_USERNAME | YES | - |
SF_WAREHOUSE | YES | - |
be sure you assigned env vars correct in prev stage
yarn start
Server will start on default port 3004
For Cube
POST
to http://localhost:3004/api/cube/contributors_counters
body
{
"granularity": "year",
"dateRange": [
"2014-01-01T00:00:00.000",
"2024-12-31T23:59:59.999"
],
"project": "prometheus"
}
For SnowFlake
POST
to http://localhost:3004/api/sf/contributors_counters
body
{
"granularity": "month",
"dateRange": [
"2014-01-01T00:00:00.000",
"2024-12-31T23:59:59.999"
],
"project": "prometheus"
}
Follow instructions for your operating system
https://k6.io/docs/get-started/installation/
Setup Grafana K6 cloud account (optional) for better tests tracking / representation / AI analysis etc
https://grafana.com/products/cloud/k6/
Follow https://k6.io/docs/cloud/integrations/token/
to get your token
Login to your account from the CLI
k6 login cloud --token <YOUR_API_AUTH_TOKEN>
https://k6.io/docs/results-output/end-of-test/
- compile TS to JS (goja)
yarn build-k6
- run k6 locally
Cube test set:
k6 run dist/contributorsCountersCase1.load.spec.js
k6 run dist/contributorsCountersCase2.load.spec.js
k6 run dist/contributorsCountersCase3.load.spec.js
SnowFlake test set:
k6 run dist/contributorsCountersSfCase1.load.spec.js
k6 run dist/contributorsCountersSfCase2.load.spec.js
k6 run dist/contributorsCountersSfCase3.load.spec.js
https://k6.io/docs/results-output/real-time/cloud/
- compile TS to JS (goja)
yarn build-k6
- run k6 locally
Cube test set:
k6 --out cloud run dist/contributorsCountersCase1.load.spec.js
k6 --out cloud run dist/contributorsCountersCase2.load.spec.js
k6 --out cloud run dist/contributorsCountersCase3.load.spec.js
SnowFlake test set:
k6 --out cloud run dist/contributorsCountersSfCase1.load.spec.js
k6 --out cloud run dist/contributorsCountersSfCase2.load.spec.js
k6 --out cloud run dist/contributorsCountersSfCase3.load.spec.js
500VU/h available for free account
- compile TS to JS (goja)
yarn build-k6
- run k6 locally
Cube test set:
k6 cloud dist/contributorsCountersCase1.load.spec.js
k6 cloud dist/contributorsCountersCase2.load.spec.js
k6 cloud dist/contributorsCountersCase3.load.spec.js
SnowFlake test set:
k6 cloud dist/contributorsCountersSfCase1.load.spec.js
k6 cloud dist/contributorsCountersSfCase2.load.spec.js
k6 cloud dist/contributorsCountersSfCase3.load.spec.js
- Provide values for
*.secret
files needed byscripts/server.sh
. - Start server via:
./scripts/server.sh
. Or manually changing to another developer (othe rthan define din `*.secret files):SF_USERNAME=lf_lukasz SF_PASS=[redacted] SF_WAREHOUSE=DBT_INSIGHTS_DEV ./scripts/server.sh
. - Call example API via:
./scripts/api-contributors-leaderboard.sh
. - Call example API via:
./scripts/api-organizations-leaderboard.sh
. - Call example API via:
./scripts/api-contributors-bus-factorsh
. - Call example API via:
./scripts/api-organizations-elephant-factor.sh
. - Call example API via:
./scripts/api-cache-stats.sh
.
This project’s source code is licensed under the MIT License. A copy of the license is available in LICENSE.
The project includes source code from keycloak, which is licensed under the Apache License, version 2.0 (Apache-2.0), a copy of which is available in LICENSE-keycloak.
This project’s documentation is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0). A copy of the license is available in LICENSE-docs.
Copyright The Linux Foundation and each contributor to LFX.