class Beetle::JobExec

Overview

Defines a collection of statistics summarising a Job execution. You never directly instantiate this class. A JSON representation of this class is returned in the response to an /exec request.

If you define an Archiver object for a Server, an instance of this class is also passed to the Archiver#archive method.

It contains the following fields:

{
  "id": "77f2d06c-be37-4bdc-98ad-02fed5acd892",
  "name": "charges_local_2",
  "host": "http://localhost:3001",
  "t_start": "2019-02-19 21:36:47.430+00:00",
  "elapsed_usec": 750782,
  "params": {
      "sc_mc": "mc"
  },
  "error_400_on_threshold_exceeded": false,
  "tasks": {
      "BCaaS::ChargeTask": {
          "host": "http://localhost:3001",
          "weight": 1,
          "sleep_min_msec": 500,
          "sleep_max_msec": 1000,
          "threshold_avg_usec": 0,
          "threshold_max_usec": 0,
          "n_task": 2,
          "n_success": 2,
          "n_fail": 0,
          "min_usec": 448,
          "max_usec": 1980,
          "avg_usec": 1214,
          "tot_usec": 2428,
          "executions": [
              {
                  "id": "80b65420-2902-4e44-8676-6e2f620003af",
                  "swarm_id": 1,
                  "t_start": "2019-02-19 21:36:47.430+00:00",
                  "elapsed_usec": 1980,
                  "request_context": "buyer_id: 5066112c-b321-40a0-ac61-a7868b1921ee",
                  "is_success": true
              },
              {
                  "id": "5f173b79-9e11-423b-9fe9-e204c669af3a",
                  "swarm_id": 1,
                  "t_start": "2019-02-19 21:36:48.180+00:00",
                  "elapsed_usec": 448,
                  "request_context": "buyer_id: 45672a98-281a-4ee3-857a-89ea27fa2dcb",
                  "is_success": true
              }
          ],
          "threshold_avg_exceeded": false,
          "threshold_max_exceeded": false
      }
  },
  "run_for_sec": 0,
  "run_n": 2,
  "n_swarm": 1,
  "threshold_exceeded": false
}

Included Modules

Defined in:

beetle/job-exec.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def clone #

Returns a copy of self with all instance variables cloned.


[View source]