def get_job_timeseries()

in analytics/circleci_analyze.py [0:0]


    def get_job_timeseries(self, job_name: str,
                           slug: str = 'gh/pytorch/pytorch',
                           workflow: str = 'build',
                           branch: Optional[str] = None) -> List:
        params = {'branch': branch} if branch is not None else {}
        items = self._get_paged_items_list(f'{self.url_prefix}/insights/{slug}/workflows/build/jobs/{job_name}', params)
        return [(str2date(x['started_at']), x['duration']) for x in items if x['status'] == 'success']