@ably-labs/locust 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/lib/Worker.js +4 -1
  2. package/package.json +1 -1
package/lib/Worker.js CHANGED
@@ -144,7 +144,7 @@ var Worker = /** @class */ (function () {
144
144
  data = _c.value[0];
145
145
  try {
146
146
  msg = Message_1.Message.decode(data);
147
- this.log.info("Received '" + msg.type + "' message");
147
+ this.log.debug("Received '" + msg.type + "' message");
148
148
  this.handle(msg);
149
149
  }
150
150
  catch (err) {
@@ -237,6 +237,7 @@ var Worker = /** @class */ (function () {
237
237
  this.lastReceivedSpawnTimestamp = data.timestamp;
238
238
  this.state = "spawning" /* Spawning */;
239
239
  this.send("spawning" /* Spawning */, null);
240
+ this.log.info("Handling spawn message: expected = " + JSON.stringify(data.user_classes_count) + ", actual = " + JSON.stringify(this.spawnState().user_classes_count));
240
241
  for (var _i = 0, _a = Object.keys(data.user_classes_count); _i < _a.length; _i++) {
241
242
  var userClass = _a[_i];
242
243
  // check we have a registered function for the given class
@@ -317,6 +318,7 @@ var Worker = /** @class */ (function () {
317
318
  * Start the given number of users.
318
319
  */
319
320
  Worker.prototype.startUsers = function (userClass, userFn, count) {
321
+ this.log.debug("Starting " + count + " " + userClass + " users");
320
322
  for (var i = 0; i < count; i++) {
321
323
  try {
322
324
  var user = userFn();
@@ -340,6 +342,7 @@ var Worker = /** @class */ (function () {
340
342
  * Stop the given number of users.
341
343
  */
342
344
  Worker.prototype.stopUsers = function (userClass, count) {
345
+ this.log.debug("Stopping " + count + " " + userClass + " users");
343
346
  for (var i = 0; i < count; i++) {
344
347
  var user = this.users[userClass].pop();
345
348
  if (user !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ably-labs/locust",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "A JavaScript load generator for Locust.io.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",