refactor(cost-coverage): move cost coverage graph generation to separate function