{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://totktonada.online/tarantool/perf/otava.schema.json",
 "title": "Tarantool performance: Otava",
 "description": "The data of https://totktonada.online/tarantool/perf/otava: how Otava's change points came and went over the analyses of each branch, and where. The pages are a first version: until they settle, a field may still change incompatibly, the schema with it in the same build. Every build matches its schema.",
 "type": "object",
 "required": [
  "$schema",
  "page",
  "generated",
  "newest",
  "magnitude",
  "lines"
 ],
 "additionalProperties": false,
 "properties": {
  "$schema": {
   "type": "string",
   "format": "uri",
   "description": "This schema."
  },
  "page": {
   "type": "string",
   "format": "uri",
   "description": "The page this is the data of."
  },
  "generated": {
   "$ref": "#/$defs/time",
   "description": "When the page was built."
  },
  "newest": {
   "anyOf": [
    {
     "$ref": "#/$defs/time"
    },
    {
     "type": "null"
    }
   ],
   "description": "When the newest run of the 21 days wrote its points; null if none did."
  },
  "magnitude": {
   "type": "number",
   "description": "Otava's --magnitude: a change smaller than this is merged away."
  },
  "lines": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "branch",
     "analyses",
     "newest",
     "lasting",
     "again",
     "earlier",
     "most",
     "often",
     "subtests"
    ],
    "additionalProperties": false,
    "properties": {
     "branch": {
      "type": "string",
      "description": "master or release/X.Y."
     },
     "analyses": {
      "type": "integer",
      "minimum": 0,
      "description": "Its runs in the 21 days that ran Otava over it."
     },
     "newest": {
      "type": "integer",
      "minimum": 0,
      "description": "The change points of its newest analysis in the 21 days."
     },
     "lasting": {
      "type": "integer",
      "minimum": 0,
      "description": "Those that every analysis since reported, once one had."
     },
     "again": {
      "type": "integer",
      "minimum": 0,
      "description": "Those that an analysis since dropped and a later one reported again."
     },
     "earlier": {
      "type": "integer",
      "minimum": 0,
      "description": "The change points only earlier analyses reported."
     },
     "most": {
      "type": "integer",
      "minimum": 0,
      "description": "Those that most of the analyses since reported."
     },
     "often": {
      "type": "integer",
      "minimum": 0,
      "description": "Those that analyses dropped more than once."
     },
     "subtests": {
      "type": "array",
      "items": {
       "type": "object",
       "required": [
        "series",
        "bench",
        "subtest",
        "page",
        "changes"
       ],
       "additionalProperties": false,
       "properties": {
        "series": {
         "type": "string",
         "description": "The subtest's name in InfluxDB and Otava: <bench>_<subtest>, with /, <, > and : written _."
        },
        "bench": {
         "type": "string",
         "description": "The benchmark: perf/<bench>.cc or perf/lua/<bench>.lua."
        },
        "subtest": {
         "type": "string",
         "description": "The subtest, as the benchmark names it."
        },
        "page": {
         "type": "string",
         "format": "uri",
         "description": "The subtest's page."
        },
        "changes": {
         "type": "array",
         "items": {
          "type": "object",
          "required": [
           "pct",
           "seen",
           "possible",
           "drops",
           "shifted",
           "at",
           "newest"
          ],
          "additionalProperties": false,
          "properties": {
           "pct": {
            "type": "number",
            "description": "Otava's size of the change, in percent of the level before it: positive is faster."
           },
           "seen": {
            "type": "integer",
            "minimum": 0,
            "description": "How many analyses since saw the same change at the same place, the newest included: a change that comes and goes is seen by few."
           },
           "possible": {
            "type": "integer",
            "minimum": 0,
            "description": "How many analyses ran since: the branch's runs after the change that ran Otava."
           },
           "drops": {
            "type": "integer",
            "minimum": 0,
            "description": "How many times one of those analyses left it out after the one before had reported it: 0 for a change point that stayed once reported."
           },
           "shifted": {
            "type": "boolean",
            "description": "Whether Otava read this subtest's columns shifted: a comma in its name splits the quoted name in the CSV Otava reads, so it took CPU time for items per second."
           },
           "at": {
            "$ref": "#/$defs/time",
            "description": "When the first run after it wrote its points."
           },
           "newest": {
            "type": "boolean",
            "description": "Whether the newest analysis has it."
           }
          },
          "description": "A change point the analyses disagreed on."
         },
         "description": "The change points that came and went, the oldest first."
        }
       }
      },
      "description": "The subtests with change points that came and went, the most first."
     }
    }
   },
   "description": "By branch."
  }
 },
 "$defs": {
  "time": {
   "type": "string",
   "format": "date-time",
   "description": "ISO 8601, in UTC+3."
  },
  "sha": {
   "type": "string",
   "pattern": "^[0-9a-f]{12}$",
   "description": "A commit of tarantool/tarantool: the first 12 digits of its hash."
  },
  "run": {
   "type": "object",
   "required": [
    "run",
    "attempt",
    "kind",
    "tag",
    "sha",
    "at",
    "url"
   ],
   "additionalProperties": false,
   "properties": {
    "run": {
     "type": "integer",
     "minimum": 0,
     "description": "The run of perf_micro: its id on GitHub."
    },
    "attempt": {
     "type": "integer",
     "minimum": 1,
     "description": "The attempt of the run."
    },
    "kind": {
     "enum": [
      "push",
      "nightly",
      "manual",
      "tag",
      "pull request"
     ],
     "description": "What started a run: a push to its branch, the nightly schedule (master only), a run by hand, a tag, a pull request labeled performance."
    },
    "tag": {
     "anyOf": [
      {
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "description": "The tag of a tag's run; null otherwise."
    },
    "sha": {
     "$ref": "#/$defs/sha",
     "description": "The commit it measured."
    },
    "at": {
     "$ref": "#/$defs/time",
     "description": "When it wrote its points: its own row's time in Otava's tables, or else when its aggregate step started."
    },
    "url": {
     "type": "string",
     "format": "uri",
     "description": "Its job on GitHub."
    }
   },
   "description": "A run of perf_micro on the performance runner."
  },
  "commit": {
   "type": "object",
   "required": [
    "sha",
    "subject",
    "author",
    "date"
   ],
   "additionalProperties": false,
   "properties": {
    "sha": {
     "$ref": "#/$defs/sha"
    },
    "subject": {
     "anyOf": [
      {
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "description": "Its subject; null if the clone does not have the commit."
    },
    "author": {
     "anyOf": [
      {
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "description": "Its author's name; null likewise."
    },
    "date": {
     "anyOf": [
      {
       "type": "string",
       "format": "date-time"
      },
      {
       "type": "null"
      }
     ],
     "description": "Its commit date, in the time zone git has it in; null likewise."
    }
   },
   "description": "A commit of tarantool/tarantool."
  },
  "change": {
   "type": "object",
   "required": [
    "before",
    "after",
    "pct",
    "seen",
    "possible",
    "drops",
    "shifted",
    "same_commit",
    "commits",
    "code",
    "workflow",
    "compare"
   ],
   "additionalProperties": false,
   "properties": {
    "before": {
     "type": "integer",
     "minimum": 0,
     "description": "The last run before the change: its index in the runs."
    },
    "after": {
     "type": "integer",
     "minimum": 0,
     "description": "The first run after it, likewise."
    },
    "pct": {
     "type": "number",
     "description": "Otava's size of the change, in percent of the level before it: positive is faster."
    },
    "seen": {
     "type": "integer",
     "minimum": 0,
     "description": "How many analyses since saw the same change at the same place, the newest included: a change that comes and goes is seen by few."
    },
    "possible": {
     "type": "integer",
     "minimum": 0,
     "description": "How many analyses ran since: the branch's runs after the change that ran Otava."
    },
    "drops": {
     "type": "integer",
     "minimum": 0,
     "description": "How many times one of those analyses left it out after the one before had reported it: 0 for a change point that stayed once reported."
    },
    "shifted": {
     "type": "boolean",
     "description": "Whether Otava read this subtest's columns shifted: a comma in its name splits the quoted name in the CSV Otava reads, so it took CPU time for items per second."
    },
    "same_commit": {
     "type": "boolean",
     "description": "Whether the runs before and after it measured one commit, so that no code changed between them."
    },
    "commits": {
     "type": "integer",
     "minimum": 0,
     "description": "The commits between the two runs along the first parents, the later run's included; 0 for one commit."
    },
    "code": {
     "type": "boolean",
     "description": "Whether those commits change the code the benchmarks build from: src, third_party, perf, cmake, patches, CMakeLists.txt."
    },
    "workflow": {
     "type": "boolean",
     "description": "Whether they change the workflow that runs the benchmarks."
    },
    "compare": {
     "anyOf": [
      {
       "type": "string",
       "format": "uri",
       "description": ""
      },
      {
       "type": "null"
      }
     ],
     "description": "The commits on GitHub, a compare of the two; null for one commit."
    }
   },
   "description": "A change point of Otava's newest analysis of the branch, between two runs."
  },
  "earlier": {
   "type": "object",
   "required": [
    "before",
    "after",
    "pct",
    "seen",
    "possible",
    "drops",
    "shifted",
    "same_commit",
    "commits",
    "code",
    "workflow",
    "compare",
    "first",
    "last"
   ],
   "additionalProperties": false,
   "properties": {
    "before": {
     "type": "integer",
     "minimum": 0,
     "description": "The last run before the change: its index in the runs."
    },
    "after": {
     "type": "integer",
     "minimum": 0,
     "description": "The first run after it, likewise."
    },
    "pct": {
     "type": "number",
     "description": "Otava's size of the change, in percent of the level before it, as the last analysis that reported it had it: positive is faster."
    },
    "seen": {
     "type": "integer",
     "minimum": 0,
     "description": "How many analyses since reported it; the newest is not one of them."
    },
    "possible": {
     "type": "integer",
     "minimum": 0,
     "description": "How many analyses ran since: the branch's runs after the change that ran Otava."
    },
    "drops": {
     "type": "integer",
     "minimum": 0,
     "description": "How many times one of those analyses left it out after the one before had reported it: 0 for a change point that stayed once reported."
    },
    "shifted": {
     "type": "boolean",
     "description": "Whether the last analysis that reported it read this subtest's columns shifted (a comma in the name)."
    },
    "same_commit": {
     "type": "boolean",
     "description": "Whether the runs before and after it measured one commit, so that no code changed between them."
    },
    "commits": {
     "type": "integer",
     "minimum": 0,
     "description": "The commits between the two runs along the first parents, the later run's included; 0 for one commit."
    },
    "code": {
     "type": "boolean",
     "description": "Whether those commits change the code the benchmarks build from: src, third_party, perf, cmake, patches, CMakeLists.txt."
    },
    "workflow": {
     "type": "boolean",
     "description": "Whether they change the workflow that runs the benchmarks."
    },
    "compare": {
     "anyOf": [
      {
       "type": "string",
       "format": "uri",
       "description": ""
      },
      {
       "type": "null"
      }
     ],
     "description": "The commits on GitHub, a compare of the two; null for one commit."
    },
    "first": {
     "type": "integer",
     "minimum": 0,
     "description": "The run whose analysis reported it first: its index in the runs."
    },
    "last": {
     "type": "integer",
     "minimum": 0,
     "description": "The run whose analysis reported it last, likewise."
    }
   },
   "description": "A change point that earlier analyses of the branch reported and the newest does not: it has none at the same place, between the same two runs."
  }
 }
}
