Skip to content

[feature] add elapsed time in the json schema for all types #631

@gabrielcsapo

Description

@gabrielcsapo

Now that we have standardized the output schema it would be great to include timing information to track how long certain tasks are taking. Then the reporter provider can use that data to either present it or not.

Currently a task has the current schema looks like the following:

https://github.com/checkupjs/checkup/blob/master/packages/core/src/schemas/task-result-schema.json#L63

"properties": {
  "info": {
    "type": "object",
    "properties": {
      "taskName": {
        "type": "string"
      },
      "friendlyTaskName": {
        "type": "string"
      },
      "taskClassification": {
        "type": "object",
        "properties": {
          "category": {
            "type": "string"
          },
          "group": {
            "type": "string"
          }
        },
        "required": ["category"]
      }
    },
    "required": ["taskName", "friendlyTaskName", "taskClassification"]
  }
}

I propose adding a time object to info property:

"time": {
  "type": "object",
  "properties": {
    "elapsed": {
      "type": "number"
    },
  },
}

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions