roku-debug 0.19.1 → 0.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/LaunchConfiguration.d.ts +6 -0
- package/dist/RendezvousTracker.d.ts +54 -1
- package/dist/RendezvousTracker.js +250 -50
- package/dist/RendezvousTracker.js.map +1 -1
- package/dist/adapters/DebugProtocolAdapter.d.ts +3 -9
- package/dist/adapters/DebugProtocolAdapter.js +2 -15
- package/dist/adapters/DebugProtocolAdapter.js.map +1 -1
- package/dist/adapters/TelnetAdapter.d.ts +3 -9
- package/dist/adapters/TelnetAdapter.js +2 -15
- package/dist/adapters/TelnetAdapter.js.map +1 -1
- package/dist/debugSession/BrightScriptDebugSession.d.ts +7 -1
- package/dist/debugSession/BrightScriptDebugSession.js +48 -16
- package/dist/debugSession/BrightScriptDebugSession.js.map +1 -1
- package/dist/util.d.ts +2 -1
- package/dist/util.js +2 -2
- package/dist/util.js.map +1 -1
- package/package.json +3 -3
- package/roku-debug-0.20.1.tgz +0 -0
- package/roku-debug-0.19.1.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
## [0.20.1](https://github.com/rokucommunity/roku-debug/compare/v0.20.0...v0.20.1) - 2023-07-07
|
|
10
|
+
### Changed
|
|
11
|
+
- Fix rendezvous crash ([#156](https://github.com/rokucommunity/roku-debug/pull/156))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.20.0](https://github.com/rokucommunity/roku-debug/compare/v0.19.1...v0.20.0) - 2023-07-05
|
|
16
|
+
### Added
|
|
17
|
+
- Support sgrendezvous through ECP ([#150](https://github.com/rokucommunity/roku-debug/pull/150))
|
|
18
|
+
### Changed
|
|
19
|
+
- upgrade to [brighterscript@0.65.1](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#0651---2023-06-09)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
9
23
|
## [0.19.1](https://github.com/rokucommunity/roku-debug/compare/v0.19.0...v0.19.1) - 2023-06-08
|
|
10
24
|
### Changed
|
|
11
25
|
- Move @types/request to deps to fix d.bs files ([691a7be](https://github.com/rokucommunity/roku-debug/commit/691a7be))
|
|
@@ -217,6 +217,12 @@ export interface LaunchConfiguration extends DebugProtocol.LaunchRequestArgument
|
|
|
217
217
|
* Show variables that are prefixed with a special prefix designated to be hidden
|
|
218
218
|
*/
|
|
219
219
|
showHiddenVariables: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* If true: turn on ECP rendezvous tracking, or turn on 8080 rendezvous tracking if ECP unsupported
|
|
222
|
+
* If false, turn off both.
|
|
223
|
+
* @default true
|
|
224
|
+
*/
|
|
225
|
+
rendezvousTracking: boolean;
|
|
220
226
|
}
|
|
221
227
|
export interface ComponentLibraryConfiguration {
|
|
222
228
|
/**
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import type { SourceLocation } from './managers/LocationManager';
|
|
2
2
|
export declare class RendezvousTracker {
|
|
3
|
-
|
|
3
|
+
private deviceInfo;
|
|
4
|
+
constructor(deviceInfo: any);
|
|
4
5
|
private clientPathsMap;
|
|
5
6
|
private emitter;
|
|
6
7
|
private filterOutLogs;
|
|
7
8
|
private rendezvousBlocks;
|
|
8
9
|
private rendezvousHistory;
|
|
10
|
+
/**
|
|
11
|
+
* Where should the rendezvous data be tracked from? If ecp, then the ecp ping data will be reported. If telnet, then any
|
|
12
|
+
* rendezvous data from telnet will reported. If 'off', then no data will be reported
|
|
13
|
+
*/
|
|
14
|
+
private trackingSource;
|
|
15
|
+
/**
|
|
16
|
+
* Determine if the current Roku device supports the ECP rendezvous tracking feature
|
|
17
|
+
*/
|
|
18
|
+
get doesHostSupportEcpRendezvousTracking(): boolean;
|
|
19
|
+
logger: import("@rokucommunity/logger/dist/Logger").Logger;
|
|
9
20
|
on(eventname: 'rendezvous', handler: (output: RendezvousHistory) => void): any;
|
|
10
21
|
private emit;
|
|
11
22
|
get getRendezvousHistory(): RendezvousHistory;
|
|
@@ -26,6 +37,32 @@ export declare class RendezvousTracker {
|
|
|
26
37
|
* Clears the current rendezvous history
|
|
27
38
|
*/
|
|
28
39
|
clearHistory(): void;
|
|
40
|
+
private ecpPingTimer;
|
|
41
|
+
startEcpPingTimer(): void;
|
|
42
|
+
stopEcpPingTimer(): void;
|
|
43
|
+
pingEcpRendezvous(): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* Determine if rendezvous tracking is enabled via the 8080 telnet command
|
|
46
|
+
*/
|
|
47
|
+
getIsTelnetRendezvousTrackingEnabled(): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Run a SceneGraph logendezvous 8080 command and get the text output
|
|
50
|
+
*/
|
|
51
|
+
private runSGLogrendezvousCommand;
|
|
52
|
+
/**
|
|
53
|
+
* Determine if rendezvous tracking is enabled via the ECP command
|
|
54
|
+
*/
|
|
55
|
+
getIsEcpRendezvousTrackingEnabled(): Promise<boolean>;
|
|
56
|
+
activate(): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Get the response from an ECP sgrendezvous request from the Roku
|
|
59
|
+
*/
|
|
60
|
+
getEcpRendezvous(): Promise<EcpRendezvousData>;
|
|
61
|
+
/**
|
|
62
|
+
* Enable/Disable ECP Rendezvous tracking on the Roku device
|
|
63
|
+
* @returns true if successful, false if there was an issue setting the value
|
|
64
|
+
*/
|
|
65
|
+
toggleEcpRendezvousTracking(toggle: 'track' | 'untrack'): Promise<boolean>;
|
|
29
66
|
/**
|
|
30
67
|
* Takes the debug output from the device and parses it for any rendezvous information.
|
|
31
68
|
* Also if consoleOutput was not set to 'full' then any rendezvous output will be filtered from the output.
|
|
@@ -33,6 +70,7 @@ export declare class RendezvousTracker {
|
|
|
33
70
|
* @returns The debug output after parsing
|
|
34
71
|
*/
|
|
35
72
|
processLog(log: string): Promise<string>;
|
|
73
|
+
private parseRendezvousLog;
|
|
36
74
|
/**
|
|
37
75
|
* Checks the client path map for existing path data and adds new data to the map if not found
|
|
38
76
|
* @param fileName The filename or path parsed from the rendezvous output
|
|
@@ -56,6 +94,10 @@ export declare class RendezvousTracker {
|
|
|
56
94
|
* @param duration how long the rendezvous took to complete, if not supplied it is assumed to be zero
|
|
57
95
|
*/
|
|
58
96
|
private getTime;
|
|
97
|
+
/**
|
|
98
|
+
* Destroy/tear down this class
|
|
99
|
+
*/
|
|
100
|
+
destroy(): Promise<void>;
|
|
59
101
|
}
|
|
60
102
|
export interface RendezvousHistory {
|
|
61
103
|
hitCount: number;
|
|
@@ -78,5 +120,16 @@ interface RendezvousLineInfo {
|
|
|
78
120
|
totalTime: number;
|
|
79
121
|
type: ElementType;
|
|
80
122
|
}
|
|
123
|
+
interface EcpRendezvousData {
|
|
124
|
+
trackingEnabled: boolean;
|
|
125
|
+
items: EcpRendezvousItem[];
|
|
126
|
+
}
|
|
127
|
+
interface EcpRendezvousItem {
|
|
128
|
+
id: string;
|
|
129
|
+
startTime: string;
|
|
130
|
+
endTime: string;
|
|
131
|
+
lineNumber: string;
|
|
132
|
+
file: string;
|
|
133
|
+
}
|
|
81
134
|
declare type ElementType = 'fileInfo' | 'historyInfo' | 'lineInfo';
|
|
82
135
|
export {};
|
|
@@ -4,14 +4,33 @@ exports.RendezvousTracker = void 0;
|
|
|
4
4
|
const events_1 = require("events");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const replaceLast = require("replace-last");
|
|
7
|
+
const logging_1 = require("./logging");
|
|
8
|
+
const SceneGraphDebugCommandController_1 = require("./SceneGraphDebugCommandController");
|
|
9
|
+
const xml2js = require("xml2js");
|
|
10
|
+
const util_1 = require("./util");
|
|
11
|
+
const semver = require("semver");
|
|
12
|
+
const telnetRendezvousString = 'on\n';
|
|
7
13
|
class RendezvousTracker {
|
|
8
|
-
constructor() {
|
|
14
|
+
constructor(deviceInfo) {
|
|
15
|
+
this.deviceInfo = deviceInfo;
|
|
16
|
+
/**
|
|
17
|
+
* Where should the rendezvous data be tracked from? If ecp, then the ecp ping data will be reported. If telnet, then any
|
|
18
|
+
* rendezvous data from telnet will reported. If 'off', then no data will be reported
|
|
19
|
+
*/
|
|
20
|
+
this.trackingSource = 'off';
|
|
21
|
+
this.logger = logging_1.logger.createLogger(`[${RendezvousTracker.name}]`);
|
|
9
22
|
this.clientPathsMap = {};
|
|
10
23
|
this.emitter = new events_1.EventEmitter();
|
|
11
24
|
this.filterOutLogs = true;
|
|
12
25
|
this.rendezvousBlocks = {};
|
|
13
26
|
this.rendezvousHistory = this.createNewRendezvousHistory();
|
|
14
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Determine if the current Roku device supports the ECP rendezvous tracking feature
|
|
30
|
+
*/
|
|
31
|
+
get doesHostSupportEcpRendezvousTracking() {
|
|
32
|
+
return semver.gte(this.deviceInfo['software-version'], '11.5.0');
|
|
33
|
+
}
|
|
15
34
|
on(eventName, handler) {
|
|
16
35
|
this.emitter.on(eventName, handler);
|
|
17
36
|
return () => {
|
|
@@ -43,9 +62,165 @@ class RendezvousTracker {
|
|
|
43
62
|
* Clears the current rendezvous history
|
|
44
63
|
*/
|
|
45
64
|
clearHistory() {
|
|
65
|
+
this.logger.log('Clear rendezvous history');
|
|
46
66
|
this.rendezvousHistory = this.createNewRendezvousHistory();
|
|
47
67
|
this.emit('rendezvous', this.rendezvousHistory);
|
|
48
68
|
}
|
|
69
|
+
startEcpPingTimer() {
|
|
70
|
+
this.logger.log('Start ecp ping timer');
|
|
71
|
+
if (!this.ecpPingTimer) {
|
|
72
|
+
this.ecpPingTimer = setInterval(() => {
|
|
73
|
+
void this.pingEcpRendezvous();
|
|
74
|
+
}, 1000);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
stopEcpPingTimer() {
|
|
78
|
+
if (this.ecpPingTimer) {
|
|
79
|
+
clearInterval(this.ecpPingTimer);
|
|
80
|
+
this.ecpPingTimer = undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async pingEcpRendezvous() {
|
|
84
|
+
var _a;
|
|
85
|
+
try {
|
|
86
|
+
// Get ECP rendezvous data, parse it, and send it to event emitter
|
|
87
|
+
let ecpData = await this.getEcpRendezvous();
|
|
88
|
+
const items = (_a = ecpData === null || ecpData === void 0 ? void 0 : ecpData.items) !== null && _a !== void 0 ? _a : [];
|
|
89
|
+
if (items.length > 0) {
|
|
90
|
+
for (let blockInfo of items) {
|
|
91
|
+
let duration = ((parseInt(blockInfo.endTime) - parseInt(blockInfo.startTime)) / 1000).toString();
|
|
92
|
+
this.rendezvousBlocks[blockInfo.id] = {
|
|
93
|
+
fileName: await this.updateClientPathMap(blockInfo.file, parseInt(blockInfo.lineNumber)),
|
|
94
|
+
lineNumber: blockInfo.lineNumber
|
|
95
|
+
};
|
|
96
|
+
this.parseRendezvousLog(this.rendezvousBlocks[blockInfo.id], duration);
|
|
97
|
+
}
|
|
98
|
+
this.emit('rendezvous', this.rendezvousHistory);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
//if there was an error pinging rendezvous, log the error but don't bring down the app
|
|
103
|
+
console.error('There was an error fetching rendezvous data', e === null || e === void 0 ? void 0 : e.stack);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Determine if rendezvous tracking is enabled via the 8080 telnet command
|
|
108
|
+
*/
|
|
109
|
+
async getIsTelnetRendezvousTrackingEnabled() {
|
|
110
|
+
var _a, _b;
|
|
111
|
+
return ((_b = (_a = (await this.runSGLogrendezvousCommand('status'))) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'on';
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Run a SceneGraph logendezvous 8080 command and get the text output
|
|
115
|
+
*/
|
|
116
|
+
async runSGLogrendezvousCommand(command) {
|
|
117
|
+
let sgDebugCommandController = new SceneGraphDebugCommandController_1.SceneGraphDebugCommandController(this.deviceInfo.host);
|
|
118
|
+
try {
|
|
119
|
+
this.logger.info(`port 8080 command: logrendezvous ${command}`);
|
|
120
|
+
return (await sgDebugCommandController.logrendezvous(command)).result.rawResponse;
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
this.logger.warn(`An error occurred running SG command "${command}"`, error);
|
|
124
|
+
}
|
|
125
|
+
finally {
|
|
126
|
+
await sgDebugCommandController.end();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Determine if rendezvous tracking is enabled via the ECP command
|
|
131
|
+
*/
|
|
132
|
+
async getIsEcpRendezvousTrackingEnabled() {
|
|
133
|
+
let ecpData = await this.getEcpRendezvous();
|
|
134
|
+
return ecpData.trackingEnabled;
|
|
135
|
+
}
|
|
136
|
+
async activate() {
|
|
137
|
+
//if ECP tracking is supported, turn that on
|
|
138
|
+
if (this.doesHostSupportEcpRendezvousTracking) {
|
|
139
|
+
this.logger.log('Activating rendezvous tracking');
|
|
140
|
+
// Toggle ECP tracking off and on to clear the log and then continue tracking
|
|
141
|
+
let untrack = await this.toggleEcpRendezvousTracking('untrack');
|
|
142
|
+
let track = await this.toggleEcpRendezvousTracking('track');
|
|
143
|
+
const isEcpTrackingEnabled = untrack && track && await this.getIsEcpRendezvousTrackingEnabled();
|
|
144
|
+
if (isEcpTrackingEnabled) {
|
|
145
|
+
this.logger.info('ECP tracking is enabled');
|
|
146
|
+
this.trackingSource = 'ecp';
|
|
147
|
+
this.startEcpPingTimer();
|
|
148
|
+
//disable telnet rendezvous tracking since ECP is working
|
|
149
|
+
try {
|
|
150
|
+
await this.runSGLogrendezvousCommand('off');
|
|
151
|
+
}
|
|
152
|
+
catch (_a) { }
|
|
153
|
+
return true;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
this.logger.log('ECP tracking is not supported or had an issue. Trying to use telnet rendezvous tracking');
|
|
157
|
+
//ECP tracking is not supported (or had an issue). Try enabling telnet rendezvous tracking (that only works with run_as_process=0, but worth a try...)
|
|
158
|
+
await this.runSGLogrendezvousCommand('on');
|
|
159
|
+
if (await this.getIsTelnetRendezvousTrackingEnabled()) {
|
|
160
|
+
this.logger.log('telnet rendezvous tracking is enabled');
|
|
161
|
+
this.trackingSource = 'telnet';
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
this.logger.log('telnet rendezvous tracking is disabled or encountered an issue. rendezvous tracking is now disabled');
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get the response from an ECP sgrendezvous request from the Roku
|
|
171
|
+
*/
|
|
172
|
+
async getEcpRendezvous() {
|
|
173
|
+
const url = `http://${this.deviceInfo.host}:${this.deviceInfo.remotePort}/query/sgrendezvous`;
|
|
174
|
+
this.logger.info(`Sending ECP rendezvous request:`, url);
|
|
175
|
+
// Send rendezvous query to ECP
|
|
176
|
+
const rendezvousQuery = await util_1.util.httpGet(url);
|
|
177
|
+
let rendezvousQueryData = rendezvousQuery.body;
|
|
178
|
+
let ecpData = {
|
|
179
|
+
trackingEnabled: false,
|
|
180
|
+
items: []
|
|
181
|
+
};
|
|
182
|
+
this.logger.debug('Parsing rendezvous response', rendezvousQuery);
|
|
183
|
+
// Parse rendezvous query data
|
|
184
|
+
await new Promise((resolve, reject) => {
|
|
185
|
+
xml2js.parseString(rendezvousQueryData, (err, result) => {
|
|
186
|
+
if (err) {
|
|
187
|
+
reject(err);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
const itemArray = result.sgrendezvous.data[0].item;
|
|
191
|
+
ecpData.trackingEnabled = result.sgrendezvous.data[0]['tracking-enabled'][0];
|
|
192
|
+
if (Array.isArray(itemArray)) {
|
|
193
|
+
ecpData.items = itemArray.map((obj) => ({
|
|
194
|
+
id: obj.id[0],
|
|
195
|
+
startTime: obj['start-tm'][0],
|
|
196
|
+
endTime: obj['end-tm'][0],
|
|
197
|
+
lineNumber: obj['line-number'][0],
|
|
198
|
+
file: obj.file[0]
|
|
199
|
+
}));
|
|
200
|
+
}
|
|
201
|
+
resolve(ecpData);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
this.logger.debug('Parsed ECP rendezvous data:', ecpData);
|
|
206
|
+
return ecpData;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Enable/Disable ECP Rendezvous tracking on the Roku device
|
|
210
|
+
* @returns true if successful, false if there was an issue setting the value
|
|
211
|
+
*/
|
|
212
|
+
async toggleEcpRendezvousTracking(toggle) {
|
|
213
|
+
try {
|
|
214
|
+
this.logger.log(`Sending ecp sgrendezvous request: ${toggle}`);
|
|
215
|
+
const response = await util_1.util.httpPost(`http://${this.deviceInfo.host}:${this.deviceInfo.remotePort}/sgrendezvous/${toggle}`,
|
|
216
|
+
//not sure if we need this, but it works...so probably better to just leave it here
|
|
217
|
+
{ body: '' });
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
49
224
|
/**
|
|
50
225
|
* Takes the debug output from the device and parses it for any rendezvous information.
|
|
51
226
|
* Also if consoleOutput was not set to 'full' then any rendezvous output will be filtered from the output.
|
|
@@ -53,7 +228,6 @@ class RendezvousTracker {
|
|
|
53
228
|
* @returns The debug output after parsing
|
|
54
229
|
*/
|
|
55
230
|
async processLog(log) {
|
|
56
|
-
var _a, _b;
|
|
57
231
|
let dataChanged = false;
|
|
58
232
|
let lines = log.split('\n');
|
|
59
233
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -61,58 +235,25 @@ class RendezvousTracker {
|
|
|
61
235
|
let match = /\[sg\.node\.(BLOCK|UNBLOCK)\s{0,}\] Rendezvous\[(\d+)\](?:\s\w+\n|\s\w{2}\s(.*)\((\d+)\)|[\s\w]+(\d+\.\d+)+|\s\w+)/g.exec(line);
|
|
62
236
|
// see the following for an explanation for this regex: https://regex101.com/r/In0t7d/6
|
|
63
237
|
if (match) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
else if (type === 'UNBLOCK' && this.rendezvousBlocks[id]) {
|
|
73
|
-
// detected the completion of a rendezvous event
|
|
74
|
-
dataChanged = true;
|
|
75
|
-
let blockInfo = this.rendezvousBlocks[id];
|
|
76
|
-
let clientLineNumber = (_b = (_a = this.clientPathsMap[blockInfo.fileName]) === null || _a === void 0 ? void 0 : _a.clientLines[blockInfo.lineNumber].toString()) !== null && _b !== void 0 ? _b : blockInfo.lineNumber;
|
|
77
|
-
if (this.rendezvousHistory.occurrences[blockInfo.fileName]) {
|
|
78
|
-
// file is in history
|
|
79
|
-
if (this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber]) {
|
|
80
|
-
// line is in history, just update it
|
|
81
|
-
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber].totalTime += this.getTime(duration);
|
|
82
|
-
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber].hitCount++;
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
// new line to be added to a file in history
|
|
86
|
-
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber] = this.createLineObject(blockInfo.fileName, parseInt(clientLineNumber), duration);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
// new file to be added to the history
|
|
91
|
-
this.rendezvousHistory.occurrences[blockInfo.fileName] = {
|
|
92
|
-
occurrences: {
|
|
93
|
-
[clientLineNumber]: this.createLineObject(blockInfo.fileName, parseInt(clientLineNumber), duration)
|
|
94
|
-
},
|
|
95
|
-
hitCount: 0,
|
|
96
|
-
totalTime: 0,
|
|
97
|
-
type: 'fileInfo',
|
|
98
|
-
zeroCostHitCount: 0
|
|
238
|
+
if (this.trackingSource === 'telnet') {
|
|
239
|
+
let [, type, id, fileName, lineNumber, duration] = match;
|
|
240
|
+
if (type === 'BLOCK') {
|
|
241
|
+
// detected the start of a rendezvous event
|
|
242
|
+
this.rendezvousBlocks[id] = {
|
|
243
|
+
fileName: await this.updateClientPathMap(fileName, parseInt(lineNumber)),
|
|
244
|
+
lineNumber: lineNumber
|
|
99
245
|
};
|
|
100
246
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.rendezvousHistory.totalTime += timeToAdd;
|
|
109
|
-
if (timeToAdd === 0) {
|
|
110
|
-
this.rendezvousHistory.occurrences[blockInfo.fileName].zeroCostHitCount++;
|
|
111
|
-
this.rendezvousHistory.zeroCostHitCount++;
|
|
247
|
+
else if (type === 'UNBLOCK' && this.rendezvousBlocks[id]) {
|
|
248
|
+
// detected the completion of a rendezvous event
|
|
249
|
+
dataChanged = true;
|
|
250
|
+
let blockInfo = this.rendezvousBlocks[id];
|
|
251
|
+
this.parseRendezvousLog(blockInfo, duration);
|
|
252
|
+
// remove this event from pre history tracking
|
|
253
|
+
delete this.rendezvousBlocks[id];
|
|
112
254
|
}
|
|
113
|
-
// remove this event from pre history tracking
|
|
114
|
-
delete this.rendezvousBlocks[id];
|
|
115
255
|
}
|
|
256
|
+
// still need to empty logs even if rendezvous tracking through ECP is enabled
|
|
116
257
|
if (this.filterOutLogs) {
|
|
117
258
|
lines.splice(i--, 1);
|
|
118
259
|
}
|
|
@@ -123,6 +264,46 @@ class RendezvousTracker {
|
|
|
123
264
|
}
|
|
124
265
|
return lines.join('\n');
|
|
125
266
|
}
|
|
267
|
+
parseRendezvousLog(blockInfo, duration) {
|
|
268
|
+
var _a, _b;
|
|
269
|
+
let clientLineNumber = (_b = (_a = this.clientPathsMap[blockInfo.fileName]) === null || _a === void 0 ? void 0 : _a.clientLines[blockInfo.lineNumber].toString()) !== null && _b !== void 0 ? _b : blockInfo.lineNumber;
|
|
270
|
+
if (this.rendezvousHistory.occurrences[blockInfo.fileName]) {
|
|
271
|
+
// file is in history
|
|
272
|
+
if (this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber]) {
|
|
273
|
+
// line is in history, just update it
|
|
274
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber].totalTime += this.getTime(duration);
|
|
275
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber].hitCount++;
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
// new line to be added to a file in history
|
|
279
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].occurrences[clientLineNumber] = this.createLineObject(blockInfo.fileName, parseInt(clientLineNumber), duration);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
// new file to be added to the history
|
|
284
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName] = {
|
|
285
|
+
occurrences: {
|
|
286
|
+
[clientLineNumber]: this.createLineObject(blockInfo.fileName, parseInt(clientLineNumber), duration)
|
|
287
|
+
},
|
|
288
|
+
hitCount: 0,
|
|
289
|
+
totalTime: 0,
|
|
290
|
+
type: 'fileInfo',
|
|
291
|
+
zeroCostHitCount: 0
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
// how much time to add to the files total time
|
|
295
|
+
let timeToAdd = this.getTime(duration);
|
|
296
|
+
// increment hit count and add to the total time for this file
|
|
297
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].hitCount++;
|
|
298
|
+
this.rendezvousHistory.hitCount++;
|
|
299
|
+
// increment hit count and add to the total time for the history as a whole
|
|
300
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].totalTime += timeToAdd;
|
|
301
|
+
this.rendezvousHistory.totalTime += timeToAdd;
|
|
302
|
+
if (timeToAdd === 0) {
|
|
303
|
+
this.rendezvousHistory.occurrences[blockInfo.fileName].zeroCostHitCount++;
|
|
304
|
+
this.rendezvousHistory.zeroCostHitCount++;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
126
307
|
/**
|
|
127
308
|
* Checks the client path map for existing path data and adds new data to the map if not found
|
|
128
309
|
* @param fileName The filename or path parsed from the rendezvous output
|
|
@@ -214,6 +395,25 @@ class RendezvousTracker {
|
|
|
214
395
|
getTime(duration) {
|
|
215
396
|
return duration ? parseFloat(duration) : 0.000;
|
|
216
397
|
}
|
|
398
|
+
/**
|
|
399
|
+
* Destroy/tear down this class
|
|
400
|
+
*/
|
|
401
|
+
async destroy() {
|
|
402
|
+
var _a;
|
|
403
|
+
(_a = this.emitter) === null || _a === void 0 ? void 0 : _a.removeAllListeners();
|
|
404
|
+
this.stopEcpPingTimer();
|
|
405
|
+
//turn off ECP rendezvous tracking
|
|
406
|
+
if (this.doesHostSupportEcpRendezvousTracking) {
|
|
407
|
+
await this.toggleEcpRendezvousTracking('untrack');
|
|
408
|
+
}
|
|
409
|
+
//turn off telnet rendezvous tracking
|
|
410
|
+
try {
|
|
411
|
+
await this.runSGLogrendezvousCommand('off');
|
|
412
|
+
}
|
|
413
|
+
catch (e) {
|
|
414
|
+
this.logger.error('Failed to disable logrendezvous over 8080', e);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
217
417
|
}
|
|
218
418
|
exports.RendezvousTracker = RendezvousTracker;
|
|
219
419
|
//# sourceMappingURL=RendezvousTracker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RendezvousTracker.js","sourceRoot":"","sources":["../src/RendezvousTracker.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AACtC,6BAA6B;AAC7B,4CAA4C;AAG5C,MAAa,iBAAiB;IAC1B;QACI,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,qBAAY,EAAE,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,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,EAAE,aAAa;YACnB,gBAAgB,EAAE,CAAC;SACtB,CAAC;IACN,CAAC;IAED;;;;;OAKG;IACK,gBAAgB,CAAC,QAAgB,EAAE,UAAkB,EAAE,QAAiB;;QAC5E,OAAO;YACH,gBAAgB,EAAE,UAAU;YAC5B,UAAU,EAAE,MAAA,MAAA,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,0CAAE,UAAU,mCAAI,QAAQ;YACjE,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YACjC,IAAI,EAAE,UAAU;SACnB,CAAC;IACN,CAAC;IAED;;;OAGG;IACK,OAAO,CAAC,QAAiB;QAC7B,OAAO,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;;QAChB,MAAA,IAAI,CAAC,OAAO,0CAAE,kBAAkB,EAAE,CAAC;QACnC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,kCAAkC;QAClC,IAAI,IAAI,CAAC,oCAAoC,EAAE;YAC3C,MAAM,IAAI,CAAC,2BAA2B,CAAC,SAAS,CAAC,CAAC;SACrD;QAED,qCAAqC;QACrC,IAAI;YACA,MAAM,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC;SAC/C;QAAC,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,CAAC,CAAC,CAAC;SACrE;IACL,CAAC;CACJ;AAzbD,8CAybC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { ConstructorOptions, ProtocolVersionDetails } from '../debugProtocol/Debugger';
|
|
2
2
|
import type { BSDebugDiagnostic } from '../CompileErrorProcessor';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RendezvousTracker } from '../RendezvousTracker';
|
|
4
4
|
import type { ChanperfData } from '../ChanperfTracker';
|
|
5
|
-
import type { SourceLocation } from '../managers/LocationManager';
|
|
6
5
|
import type { AdapterOptions, HighLevelType, RokuAdapterEvaluateResponse } from '../interfaces';
|
|
7
6
|
import type { BreakpointManager } from '../managers/BreakpointManager';
|
|
8
7
|
import type { ProjectManager } from '../managers/ProjectManager';
|
|
@@ -14,7 +13,8 @@ export declare class DebugProtocolAdapter {
|
|
|
14
13
|
private options;
|
|
15
14
|
private projectManager;
|
|
16
15
|
private breakpointManager;
|
|
17
|
-
|
|
16
|
+
private rendezvousTracker;
|
|
17
|
+
constructor(options: AdapterOptions & ConstructorOptions, projectManager: ProjectManager, breakpointManager: BreakpointManager, rendezvousTracker: RendezvousTracker);
|
|
18
18
|
private logger;
|
|
19
19
|
/**
|
|
20
20
|
* Indicates whether the adapter has successfully established a connection with the device
|
|
@@ -30,7 +30,6 @@ export declare class DebugProtocolAdapter {
|
|
|
30
30
|
private compileErrorProcessor;
|
|
31
31
|
private emitter;
|
|
32
32
|
private chanperfTracker;
|
|
33
|
-
private rendezvousTracker;
|
|
34
33
|
private socketDebugger;
|
|
35
34
|
private nextFrameId;
|
|
36
35
|
private stackFramesCache;
|
|
@@ -54,7 +53,6 @@ export declare class DebugProtocolAdapter {
|
|
|
54
53
|
on(eventName: 'connected', handler: (params: boolean) => void): any;
|
|
55
54
|
on(eventname: 'console-output', handler: (output: string) => void): any;
|
|
56
55
|
on(eventname: 'protocol-version', handler: (output: ProtocolVersionDetails) => void): any;
|
|
57
|
-
on(eventname: 'rendezvous', handler: (output: RendezvousHistory) => void): any;
|
|
58
56
|
on(eventName: 'runtime-error', handler: (error: BrightScriptRuntimeError) => void): any;
|
|
59
57
|
on(eventName: 'suspend', handler: () => void): any;
|
|
60
58
|
on(eventName: 'start', handler: () => void): any;
|
|
@@ -134,10 +132,6 @@ export declare class DebugProtocolAdapter {
|
|
|
134
132
|
* Disconnect from the telnet session and unset all objects
|
|
135
133
|
*/
|
|
136
134
|
destroy(): Promise<void>;
|
|
137
|
-
/**
|
|
138
|
-
* Passes the debug functions used to locate the client files and lines to the RendezvousTracker
|
|
139
|
-
*/
|
|
140
|
-
registerSourceLocator(sourceLocator: (debuggerPath: string, lineNumber: number) => Promise<SourceLocation>): void;
|
|
141
135
|
/**
|
|
142
136
|
* Passes the log level down to the RendezvousTracker and ChanperfTracker
|
|
143
137
|
* @param outputLevel the consoleOutput from the launch config
|
|
@@ -5,7 +5,6 @@ const Debugger_1 = require("../debugProtocol/Debugger");
|
|
|
5
5
|
const EventEmitter = require("events");
|
|
6
6
|
const net_1 = require("net");
|
|
7
7
|
const CompileErrorProcessor_1 = require("../CompileErrorProcessor");
|
|
8
|
-
const RendezvousTracker_1 = require("../RendezvousTracker");
|
|
9
8
|
const ChanperfTracker_1 = require("../ChanperfTracker");
|
|
10
9
|
const Constants_1 = require("../debugProtocol/Constants");
|
|
11
10
|
const util_1 = require("../util");
|
|
@@ -16,10 +15,11 @@ const ActionQueue_1 = require("../managers/ActionQueue");
|
|
|
16
15
|
* A class that connects to a Roku device over telnet debugger port and provides a standardized way of interacting with it.
|
|
17
16
|
*/
|
|
18
17
|
class DebugProtocolAdapter {
|
|
19
|
-
constructor(options, projectManager, breakpointManager) {
|
|
18
|
+
constructor(options, projectManager, breakpointManager, rendezvousTracker) {
|
|
20
19
|
this.options = options;
|
|
21
20
|
this.projectManager = projectManager;
|
|
22
21
|
this.breakpointManager = breakpointManager;
|
|
22
|
+
this.rendezvousTracker = rendezvousTracker;
|
|
23
23
|
this.logger = logging_1.logger.createLogger(`[${DebugProtocolAdapter.name}]`);
|
|
24
24
|
/**
|
|
25
25
|
* Due to casing issues with the variables request on some versions of the debug protocol, we first need to try the request in the supplied case.
|
|
@@ -43,17 +43,12 @@ class DebugProtocolAdapter {
|
|
|
43
43
|
util_1.util.normalizeAdapterOptions(this.options);
|
|
44
44
|
this.emitter = new EventEmitter();
|
|
45
45
|
this.chanperfTracker = new ChanperfTracker_1.ChanperfTracker();
|
|
46
|
-
this.rendezvousTracker = new RendezvousTracker_1.RendezvousTracker();
|
|
47
46
|
this.compileErrorProcessor = new CompileErrorProcessor_1.CompileErrorProcessor();
|
|
48
47
|
this.connected = false;
|
|
49
48
|
// watch for chanperf events
|
|
50
49
|
this.chanperfTracker.on('chanperf', (output) => {
|
|
51
50
|
this.emit('chanperf', output);
|
|
52
51
|
});
|
|
53
|
-
// watch for rendezvous events
|
|
54
|
-
this.rendezvousTracker.on('rendezvous', (output) => {
|
|
55
|
-
this.emit('rendezvous', output);
|
|
56
|
-
});
|
|
57
52
|
}
|
|
58
53
|
/**
|
|
59
54
|
* Get the version of the protocol for the Roku device we're currently connected to.
|
|
@@ -550,13 +545,6 @@ class DebugProtocolAdapter {
|
|
|
550
545
|
}
|
|
551
546
|
this.emitter = undefined;
|
|
552
547
|
}
|
|
553
|
-
// #region Rendezvous Tracker pass though functions
|
|
554
|
-
/**
|
|
555
|
-
* Passes the debug functions used to locate the client files and lines to the RendezvousTracker
|
|
556
|
-
*/
|
|
557
|
-
registerSourceLocator(sourceLocator) {
|
|
558
|
-
this.rendezvousTracker.registerSourceLocator(sourceLocator);
|
|
559
|
-
}
|
|
560
548
|
/**
|
|
561
549
|
* Passes the log level down to the RendezvousTracker and ChanperfTracker
|
|
562
550
|
* @param outputLevel the consoleOutput from the launch config
|
|
@@ -577,7 +565,6 @@ class DebugProtocolAdapter {
|
|
|
577
565
|
clearChanperfHistory() {
|
|
578
566
|
this.chanperfTracker.clearHistory();
|
|
579
567
|
}
|
|
580
|
-
// #endregion
|
|
581
568
|
async syncBreakpoints() {
|
|
582
569
|
//we can't send breakpoints unless we're stopped (or in a protocol version that supports sending them while running).
|
|
583
570
|
//So...if we're not stopped, quit now. (we'll get called again when the stop event happens)
|