(id: string, opts: ConfigurationArguments)
| 77 | } |
| 78 | |
| 79 | function beginSession(id: string, opts: ConfigurationArguments) { |
| 80 | if (!telemetryEnabled()) { return; } |
| 81 | |
| 82 | if (opts.rtos) { analytics.set(RTOS_TYPE_DIMENSION, opts.rtos); } |
| 83 | if (opts.device) { analytics.set(DEVICE_ID_DIMENSION, opts.device); } |
| 84 | analytics.set(GDB_SERVER_TYPE_DIMENSION, opts.servertype); |
| 85 | |
| 86 | analytics.screenview('Debug Session', 'Cortex-Debug', extensionVersion, extensionId); |
| 87 | analytics.event('Session', 'Started', '', 0, { sessionControl: 'start' }); |
| 88 | |
| 89 | if (opts.swoConfig.enabled) { |
| 90 | analytics.event('SWO', 'Used'); |
| 91 | } |
| 92 | if (opts.rttConfig.enabled) { |
| 93 | analytics.event('RTT', 'Used'); |
| 94 | } |
| 95 | if (opts.graphConfig.length > 0) { |
| 96 | analytics.event('Graphing', 'Used'); |
| 97 | } |
| 98 | |
| 99 | sessionStarts[id] = new Date(); |
| 100 | |
| 101 | analytics.send(); |
| 102 | } |
| 103 | |
| 104 | function endSession(id: string) { |
| 105 | if (!telemetryEnabled()) { return; } |
nothing calls this directly
no test coverage detected