@artilleryio/int-core
Advanced tools
Comparing version 2.14.0 to 2.15.0-8d776a8
@@ -406,11 +406,19 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
let V = template(v, context); | ||
if (V && _.isPlainObject(V) && V.fromFile) { | ||
const absPath = path.resolve( | ||
path.dirname(context.vars.$scenarioFile), | ||
V.fromFile | ||
); | ||
fileUpload = absPath; | ||
V = fs.createReadStream(absPath); | ||
let options; | ||
if (V && _.isPlainObject(V)) { | ||
if (V.contentType) { | ||
options = { contentType: V.contentType }; | ||
} | ||
if (V.fromFile) { | ||
const absPath = path.resolve( | ||
path.dirname(context.vars.$scenarioFile), | ||
V.fromFile | ||
); | ||
fileUpload = absPath; | ||
V = fs.createReadStream(absPath); | ||
} else if (V.value) { | ||
V = V.value; | ||
} | ||
} | ||
acc.append(k, V); | ||
acc.append(k, V, options); | ||
return acc; | ||
@@ -819,2 +827,30 @@ }, | ||
ee.emit('histogram', 'http.response_time', res.timings.phases.firstByte); | ||
const statusCode = res.statusCode; | ||
if (statusCode >= 200 && statusCode < 300) { | ||
ee.emit( | ||
'histogram', | ||
'http.response_time.2xx', | ||
res.timings.phases.firstByte | ||
); | ||
} else if (statusCode >= 300 && statusCode < 400) { | ||
ee.emit( | ||
'histogram', | ||
'http.response_time.3xx', | ||
res.timings.phases.firstByte | ||
); | ||
} else if (statusCode >= 400 && statusCode < 500) { | ||
ee.emit( | ||
'histogram', | ||
'http.response_time.4xx', | ||
res.timings.phases.firstByte | ||
); | ||
} else if (statusCode >= 500 && statusCode < 600) { | ||
ee.emit( | ||
'histogram', | ||
'http.response_time.5xx', | ||
res.timings.phases.firstByte | ||
); | ||
} | ||
if (this.extendedHTTPMetrics) { | ||
@@ -821,0 +857,0 @@ ee.emit('histogram', 'http.dns', res.timings.phases.dns); |
@@ -13,7 +13,4 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
const uuidv4 = require('uuid').v4; | ||
const A = require('async'); | ||
const { SSMS } = require('./ssms'); | ||
const tryResolve = require('try-require').resolve; | ||
const createPhaser = require('./phases'); | ||
const isIdlePhase = require('./is-idle-phase'); | ||
const createReader = require('./readers'); | ||
@@ -227,11 +224,5 @@ const engineUtil = require('@artilleryio/int-commons').engine_util; | ||
ee.emit('phaseStarted', spec); | ||
if (isIdlePhase(spec)) { | ||
ee.emit('stats', SSMS.empty()); | ||
} | ||
}); | ||
phaser.on('phaseCompleted', function (spec) { | ||
ee.emit('phaseCompleted', spec); | ||
if (isIdlePhase(spec)) { | ||
ee.emit('stats', SSMS.empty()); | ||
} | ||
}); | ||
@@ -412,4 +403,4 @@ phaser.on('done', function () { | ||
_.each(script.config.payload, function (el) { | ||
//when loading all the csv, we don't set individual fields | ||
if (!el.loadAll) { | ||
// Load individual fields from the CSV into VU context variables | ||
// If data = [] (i.e. the CSV file is empty, or only has headers and | ||
@@ -421,11 +412,11 @@ // skipHeaders = true), then row could = undefined | ||
}); | ||
} | ||
if (typeof el.name !== 'undefined') { | ||
// Make the entire CSV available | ||
result[el.name] = el.reader(el.data); | ||
} else { | ||
console.log( | ||
'WARNING: loadAll is set to true but no name is provided for the CSV data' | ||
); | ||
if (typeof el.name !== 'undefined') { | ||
// Make the entire CSV available | ||
result[el.name] = el.reader(el.data); | ||
} else { | ||
console.log( | ||
'WARNING: loadAll is set to true but no name is provided for the CSV data' | ||
); | ||
} | ||
} | ||
@@ -432,0 +423,0 @@ }); |
{ | ||
"name": "@artilleryio/int-core", | ||
"version": "2.14.0", | ||
"version": "2.15.0-8d776a8", | ||
"main": "./index.js", | ||
"license": "MPL-2.0", | ||
"dependencies": { | ||
"@artilleryio/int-commons": "2.10.0", | ||
"@artilleryio/int-commons": "2.11.0-8d776a8", | ||
"@artilleryio/sketches-js": "^2.1.1", | ||
@@ -34,3 +34,2 @@ "agentkeepalive": "^4.1.0", | ||
"tough-cookie": "^5.0.0-rc.2", | ||
"try-require": "^1.2.1", | ||
"uuid": "^8.0.0", | ||
@@ -37,0 +36,0 @@ "ws": "^7.5.7" |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
121822
29
3098
2
+ Added@artilleryio/int-commons@2.11.0-8d776a8(transitive)
- Removedtry-require@^1.2.1
- Removed@artilleryio/int-commons@2.10.0(transitive)
- Removedtry-require@1.2.1(transitive)