metrics
default

Calculate metrics on continuous integration runs, such as GitHub Actions, Jenkins, Circle, etc.

Changed on
post/metrics/code_checks

Request

Request body

metricsCodeCheckMetricID[] required

Requested metric identifiers.

date_fromstring date required

Date from when to start measuring the metrics.

date_tostring date required

Date until which to measure the metrics.

timezoneinteger

Local time zone offset in minutes, used to adjust date_from and date_to.

granularitiesGranularity[] required

The splits of the specified time range.

quantilesnumber[]

Cut the distributions at certain quantiles. The default values are [0, 1] which means no cutting.

accountinteger required

Session account ID.

split_by_check_runsboolean

Calculate metrics separately for each number of check runs in suite.

Example request

{
  "for": [
    {
      "repositories": [
        "github.com/athenianco/athenian-webapp",
        "github.com/athenianco/athenian-api"
      ],
      "pusher_groups": [
        [
          "github.com/vmarkovtsev",
          "github.com/dpordomingo"
        ],
        [
          "github.com/se7entyse7en"
        ]
      ]
    },
    {
      "repositories": [
        "github.com/athenianco/metadata",
        "github.com/athenianco/athenian-api"
      ],
      "pushers": [
        "github.com/vmarkovtsev",
        "github.com/se7entyse7en"
      ]
    }
  ],
  "metrics": [
    "chk-suites-count"
  ],
  "date_from": "2020-01-23",
  "date_to": "2021-01-24",
  "granularities": [
    "all"
  ],
  "account": 1
}

Response

Calculated metrics.

metricsCodeCheckMetricID[] required

Repeats CodeCheckMetricsRequest.metrics.

date_fromstring date required

Repeats CodeCheckMetricsRequest.date_from.

date_tostring date required

Repeats CodeCheckMetricsRequest.date_to.

timezoneinteger

Local time zone offset in minutes, used to adjust date_from and date_to.

granularitiesGranularity[] required

The splits of the specified time range.

quantilesnumber[]

Cut the distributions at certain quantiles. The default values are [0, 1] which means no cutting.

split_by_check_runsboolean

Repeats CodeCheckMetricsRequest.split_by_check_runs.

Example response

{
  "metrics": [
    "chk-suites-count"
  ],
  "date_from": "2020-01-23",
  "date_to": "2021-01-24",
  "granularities": [
    "all"
  ],
  "calculated": [
    {
      "values": [
        {
          "date": "2020-01-23",
          "values": [
            200
          ]
        }
      ],
      "for": {
        "repositories": [
          "github.com/athenianco/athenian-webapp",
          "github.com/athenianco/athenian-api"
        ],
        "pushers": [
          "github.com/vmarkovtsev",
          "github.com/dpordomingo"
        ]
      },
      "granularity": "all"
    }
  ]
}

Changes

    • info

      added the new optional request property ///////

    • info

      added the optional property //////// to the response with the status

    • breaking

      the request property's minItems was increased to 1