@artilleryio/int-core 2.15.0 → 2.16.0-d97dc16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -823,6 +823,34 @@ HttpEngine.prototype._handleResponse = function (
823
823
  ee.emit('counter', 'http.responses', 1);
824
824
  // ee.emit('rate', 'http.response_rate');
825
825
  ee.emit('histogram', 'http.response_time', res.timings.phases.firstByte);
826
+
827
+ const statusCode = res.statusCode;
828
+ if (statusCode >= 200 && statusCode < 300) {
829
+ ee.emit(
830
+ 'histogram',
831
+ 'http.response_time.2xx',
832
+ res.timings.phases.firstByte
833
+ );
834
+ } else if (statusCode >= 300 && statusCode < 400) {
835
+ ee.emit(
836
+ 'histogram',
837
+ 'http.response_time.3xx',
838
+ res.timings.phases.firstByte
839
+ );
840
+ } else if (statusCode >= 400 && statusCode < 500) {
841
+ ee.emit(
842
+ 'histogram',
843
+ 'http.response_time.4xx',
844
+ res.timings.phases.firstByte
845
+ );
846
+ } else if (statusCode >= 500 && statusCode < 600) {
847
+ ee.emit(
848
+ 'histogram',
849
+ 'http.response_time.5xx',
850
+ res.timings.phases.firstByte
851
+ );
852
+ }
853
+
826
854
  if (this.extendedHTTPMetrics) {
827
855
  ee.emit('histogram', 'http.dns', res.timings.phases.dns);
828
856
  ee.emit('histogram', 'http.tcp', res.timings.phases.tcp);
package/lib/runner.js CHANGED
@@ -10,11 +10,8 @@ const _ = require('lodash');
10
10
  const debug = require('debug')('runner');
11
11
  const debugPerf = require('debug')('perf');
12
12
  const uuidv4 = require('uuid').v4;
13
- const A = require('async');
14
13
  const { SSMS } = require('./ssms');
15
- const tryResolve = require('try-require').resolve;
16
14
  const createPhaser = require('./phases');
17
- const isIdlePhase = require('./is-idle-phase');
18
15
  const createReader = require('./readers');
19
16
  const engineUtil = require('@artilleryio/int-commons').engine_util;
20
17
  const wl = require('./weighted-pick');
@@ -223,15 +220,9 @@ function run(script, ee, options, runState, contextVars) {
223
220
  });
224
221
  phaser.on('phaseStarted', function (spec) {
225
222
  ee.emit('phaseStarted', spec);
226
- if (isIdlePhase(spec)) {
227
- ee.emit('stats', SSMS.empty());
228
- }
229
223
  });
230
224
  phaser.on('phaseCompleted', function (spec) {
231
225
  ee.emit('phaseCompleted', spec);
232
- if (isIdlePhase(spec)) {
233
- ee.emit('stats', SSMS.empty());
234
- }
235
226
  });
236
227
  phaser.on('done', function () {
237
228
  debug('All phases launched');
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@artilleryio/int-core",
3
- "version": "2.15.0",
3
+ "version": "2.16.0-d97dc16",
4
4
  "main": "./index.js",
5
5
  "license": "MPL-2.0",
6
6
  "dependencies": {
7
- "@artilleryio/int-commons": "2.11.0",
7
+ "@artilleryio/int-commons": "2.12.0-d97dc16",
8
8
  "@artilleryio/sketches-js": "^2.1.1",
9
9
  "agentkeepalive": "^4.1.0",
10
10
  "arrivals": "^2.1.2",
@@ -31,7 +31,6 @@
31
31
  "socket.io-client": "^4.5.1",
32
32
  "socketio-wildcard": "^2.0.0",
33
33
  "tough-cookie": "^5.0.0-rc.2",
34
- "try-require": "^1.2.1",
35
34
  "uuid": "^8.0.0",
36
35
  "ws": "^7.5.7"
37
36
  },
@@ -58,7 +57,7 @@
58
57
  "proxy": "^2.1.1",
59
58
  "rewiremock": "^3.14.3",
60
59
  "sinon": "^4.5.0",
61
- "socket.io": "^4.7.1",
60
+ "socket.io": "^4.8.0",
62
61
  "tap": "^19.0.2"
63
62
  }
64
63
  }