(file?: vs.Uri | null)
| 290 | } |
| 291 | |
| 292 | export async function activate(file?: vs.Uri | null): Promise<void> { |
| 293 | await activateWithoutAnalysis(file); |
| 294 | |
| 295 | logger.info(`Waiting for initial analysis`); |
| 296 | await privateApi.initialAnalysis; |
| 297 | // Opening a file above may start analysis after a short period so give it time to start |
| 298 | // before we continue. |
| 299 | await delay(50); |
| 300 | logger.info(`Waiting for in-progress analysis`); |
| 301 | await privateApi.currentAnalysis(); |
| 302 | |
| 303 | logger.info(`Ready to start test`); |
| 304 | const cpuLoad = os.loadavg(); |
| 305 | const totalMem = os.totalmem(); |
| 306 | const freeMem = os.freemem(); |
| 307 | logger.info(` cpuLoad: ${cpuLoad}`); |
| 308 | logger.info(` totalMem: ${totalMem}`); |
| 309 | logger.info(` freeMem: ${freeMem}`); |
| 310 | logger.info(` ${Math.round((freeMem / totalMem) * 100)}% memory is available`); |
| 311 | } |
| 312 | |
| 313 | export async function getPackages(uri?: vs.Uri) { |
| 314 | await activateWithoutAnalysis(null); |
no test coverage detected