{
    "id": "https://raw.githubusercontent.com/bh107/benchpress/master/benchpress/suite_schema.json",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Benchpress Suite Schema",
    "description": "Benchpress Suite file that contains the commands to execute and their results",
    "type": "object",
    "properties": {
        "creation_date_utc": {
            "description": "The creation time of the suite file in UTC",
            "type": "string"
        },
        "cmd_list": {
            "description": "List of the commands that makes up this benchmark suite",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "cmd": {
                        "description": "A command to execute",
                        "type": "string"
                    },
                    "env": {
                        "description": "The environment variables to define",
                        "type": "object"
                    },
                    "label": {
                        "description": "The label of the command",
                        "type": "string"
                    },
                    "jobs": {
                        "description": "List of scheduled commands",
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "status": {
                                    "description": "The status of the scheduled command",
                                    "type": "string",
                                    "pattern": "finished|failed|pending"
                                },
                                "nruns": {
                                    "description": "The number of times to executed the scheduled command",
                                    "type": "number",
                                    "minimum": 1
                                },
                                "warmup": {
                                    "description": "Include a warm up run before the recorded runs",
                                    "type": "boolean"
                                },
                                "results": {
                                    "description": "List of recorded results",
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "success": {
                                                "description": "Did the run succeed",
                                                "type": "boolean"
                                            },
                                            "stderr": {
                                                "description": "The standard error output",
                                                "type": "string"
                                            },
                                            "stdout": {
                                                "description": "The standard output",
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "success"
                                        ]
                                    }
                                }
                            },
                            "required": [
                                "status",
                                "nruns"
                            ]
                        }
                    }
                },
                "required": [
                    "cmd",
                    "env",
                    "label"
                ]
            }
        }
    },
    "required": [
        "creation_date_utc",
        "cmd_list"
    ]
}