Skip to content

Commit

Permalink
fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao Yang committed Jun 11, 2021
1 parent dc74bdd commit 997b5e8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 5 additions & 1 deletion InfluxDB.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
- `LOADRUSH_INFLUXDB_TOKEN`: `InfluxDB` token, which can be found in InfluxDB cloud admin console.
- `LOADRUSH_INFLUXDB_ORG`: `InfluxDB` organization, which be can be found in the URL of InfluxDB cloud admin console. e.g. `https://us-west-2-1.aws.cloud2.influxdata.com/orgs/<orgID>`.
- `LOADRUSH_VERBOSE_METRICS`: in terms of InfluxDB cost, text fields will be sent when it is set as `true`, otherwise only numeric fields are sent. Default: `false`.
As we know, InfluxDB Cloud free plan has a rate limit of 10kb/s write.
- `LOADRUSH_INFLUXDB_BUCKET`: the bucket (16 chars at most) used for different iteration of your testing. Default: current timestamp since unix epoch.

As we know, InfluxDB Cloud free plan has a rate limit of 10kb/s write.

## InfluxDB

Expand All @@ -23,3 +25,5 @@ Some basic metrics like requests/success/failure count, mean response time, RPS,
We choose InfluxDB as it has an intuitive UI and easy to integrate. But we will add more integrations to other monitoring platforms in the future.

![](https://i.imgur.com/gqWg5Xz.gif)


1 change: 0 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ Environment Variables:
- General
- `LOADRUSH_DURATION`: how long you plan to run your load testing.
- `LOADRUSH_BASE_URL`: the base url of your application. If you don't set, you have to use absolute URL in your http action.
- `LOADRUSH_TEST_ID`: the test id (16 chars at most) used for different iteration of your testing. Default: current timestamp since unix epoch.
- TimescaleDB
- `LOADRUSH_TIMESCALEDB_HOST`: TimescaleDB host. Default `localhost`.
- `LOADRUSH_TIMESCALEDB_PORT`: TimescaleDB port, Default `5432`.
Expand Down
12 changes: 6 additions & 6 deletions src/loadrush/meters/influxdb-meter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ export class InfluxdbMeter extends Meter {

constructor() {
super();
this.org = config.loadrush.influxdb?.org;
this.bucket = config.loadrush.influxdb?.bucket;
this.api = config.loadrush.influxdb?.api;
this.org = config.influxdb?.org;
this.bucket = config.influxdb?.bucket;
this.api = config.influxdb?.api;

if (!this.org || !this.bucket || !this.api) {
console.warn(
'LOADRUSH_INFLUXDB_ORG or LOADRUSH_INFLUXDB_API or LOADRUSH_INFLUXDB_BUCKET is not set',
);
process.exit(-1);
}
this.client = new Client(this.api, config.loadrush.influxdb.token);
this.client = new Client(this.api, config.influxdb.token);
this.createBucketIfNotExist();
this.verboseMetrics = config.loadrush.influxdb.verboseMetrics;
this.verboseMetrics = config.influxdb.verboseMetrics;
}

private createBucketIfNotExist() {
Expand Down Expand Up @@ -116,7 +116,7 @@ export class InfluxdbMeter extends Meter {
.map(([key, value]) => `${key}=${this.quoteIfNeed(value)}`)
.join(',');
}
const extraTags = config.loadrush.influxdb?.tags;
const extraTags = config.influxdb?.tags;
if (extraTags) {
joinedTags += `,${extraTags}`;
}
Expand Down

0 comments on commit 997b5e8

Please sign in to comment.