Nordstrom / artillery-plugin-influxdb

Plugin for Artillery.IO that records response data into InfluxDB.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Object testReport is not correct in influxDB.js

coderFB opened this issue · comments

When I run my .yml or .json file, it throws an error when trying to report to influxDB

/usr/local/lib/node_modules/artillery-plugin-influxdb/lib/influxdb.js:144
while (samples < testReport.latencies.length) {
^

TypeError: Cannot read properties of undefined (reading 'length')
    at Object.reportResults (/usr/local/lib/node_modules/artillery-plugin-influxdb/lib/influxdb.js:144:51)
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/artillery-plugin-influxdb/lib/influxdb.js:234:22)
    at EventEmitter.emit (/usr/local/lib/node_modules/artillery/node_modules/eventemitter3/index.js:181:35)
    at Launcher.flushIntermediateMetrics (/usr/local/lib/node_modules/artillery/lib/launch-platform.js:327:31)
    at Timeout._onTimeout (/usr/local/lib/node_modules/artillery/lib/launch-platform.js:347:12)

Here testReport.latencies is null and testReport is an object that equals a function report() that returns an object

{
  customStats: {},
  counters: {},
  scenariosAvoided: 0,
  timestamp: Invalid Date,
  scenariosCreated: 160,
  scenariosCompleted: 145,
  requestsCompleted: 145,
  latency: {
    min: 288,
    max: 1630,
    count: 145,
    p50: 432.7,
    median: 432.7,
    p75: 478.3,
    p90: 608,
    p95: 772.9,
    p99: 1525.7,
    p999: 1556.5
  },
  rps: { mean: 0, count: 145 },
  scenarioDuration: {
    min: 295.8,
    max: 1634.2,
    count: 145,
    p50: 450.4,
    median: 450.4,
    p75: 497.8,
    p90: 608,
    p95: 788.5,
    p99: 1525.7,
    p999: 1556.5
  },
  scenarioCounts: { S1: 160 },
  errors: {},
  codes: { '200': 145 }
}

So the whole data transformation breaks.
Please let me know if I am missing an environment variable or something ?
Thanks in advance.