def cpuprofile_results(self):
        if not self.samples:
            return "{}"
        call_tree, sample_ids = Profile._call_tree(self.samples)
        return json.dumps({
            "startTime": self.samples[0].timestamp_ms / 1000 + 0.01,
            "endTime": self.samples[-1].timestamp_ms / 1000,
            "head": Profile._munge_call_tree(None, call_tree),
            "samples": sample_ids,
            "timestamps": [sample.timestamp_ms * 1000
                           for sample in self.samples],
        })
Adds a response to the driver.
dataset/ETHPy150Open gae-init/gae-init-debug/main/libx/gae_mini_profiler/sampling_profiler.py/Profile.cpuprofile_results--crossover with--dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/hasresponses.py/HasResponses.add_response