def get_timestamps(trials, size, space_type):
    """Get start timestamps of the trials

    Parameters
    ----------
    trials: `list` of `orion.core.worker.trial.Trial`
        List of all trials at the end of the stress test
    space_type: str
        See `get_experiment`.
    size: int
        See `get_experiment`.

    Returns
    -------
    (`list`, `list`)
        Where rval[0] is start timestamp and rval[1] is the index of the trial.
        For instance the i-th trial timestamp is rval[0][rval[1].index(i)].

    """
    hparams = set()
    x = []
    y = []

    start_time = None
    for i, trial in enumerate(trials):
        hparams.add(trial.params["x"])
        assert trial.objective.value == trial.params["x"]
        if start_time is None:
            start_time = trial.submit_time
        x.append((trial.submit_time - start_time).total_seconds())
        y.append(i)

    if space_type in ["discrete", "real-seeded"]:
        assert len(hparams) == size
    else:
        assert len(hparams) >= size

    return x[:size], y[:size]