import type { SourceLocation } from './managers/LocationManager'; import type { DeviceInfo } from 'roku-deploy'; import type { LaunchConfiguration } from './LaunchConfiguration'; export declare class RendezvousTracker { private deviceInfo; private launchConfiguration; constructor(deviceInfo: DeviceInfo, launchConfiguration: LaunchConfiguration); private clientPathsMap; private emitter; private filterOutLogs; private rendezvousBlocks; private rendezvousHistory; /** * Where should the rendezvous data be tracked from? If ecp, then the ecp ping data will be reported. If telnet, then any * rendezvous data from telnet will reported. If 'off', then no data will be reported */ private trackingSource; /** * Determine if the current Roku device supports the ECP rendezvous tracking feature */ get doesHostSupportEcpRendezvousTracking(): boolean; logger: import("@rokucommunity/logger").Logger; on(eventname: 'rendezvous', handler: (output: RendezvousHistory) => void): any; private emit; get getRendezvousHistory(): RendezvousHistory; /** * A function that looks up the source location based on debugger information */ private getSourceLocation; /** * Registers a function that can be used to map a debug location to a source location */ registerSourceLocator(sourceLocator: (debuggerPath: string, lineNumber: number) => Promise): void; /** * Used to set wether the rendezvous should be filtered from the console output * @param outputLevel the consoleOutput from the launch config */ setConsoleOutput(outputLevel: string): void; /** * Clears the current rendezvous history */ clearHistory(): void; private ecpPingTimer; startEcpPingTimer(): void; stopEcpPingTimer(): void; pingEcpRendezvous(): Promise; /** * Determine if rendezvous tracking is enabled via the 8080 telnet command */ getIsTelnetRendezvousTrackingEnabled(): Promise; /** * Run a SceneGraph logendezvous 8080 command and get the text output */ private runSGLogrendezvousCommand; /** * Determine if rendezvous tracking is enabled via the ECP command */ getIsEcpRendezvousTrackingEnabled(): Promise; activate(): Promise; /** * Get the response from an ECP sgrendezvous request from the Roku */ getEcpRendezvous(): Promise; /** * Enable/Disable ECP Rendezvous tracking on the Roku device * @returns true if the request succeeded, false if there was an issue setting the value, and does _not_ indicate the final enabled/disabled state of the setting. */ toggleEcpRendezvousTracking(toggle: 'track' | 'untrack'): Promise; /** * Takes the debug output from the device and parses it for any rendezvous information. * Also if consoleOutput was not set to 'full' then any rendezvous output will be filtered from the output. * @param log * @returns The debug output after parsing */ processLog(log: string): Promise; private parseRendezvousLog; /** * Checks the client path map for existing path data and adds new data to the map if not found * @param fileName The filename or path parsed from the rendezvous output * @param lineNumber The line number parsed from the rendezvous output * @returns The file name that best matches the source files if we where able to map it to the source */ private updateClientPathMap; /** * Helper function used to create a new RendezvousHistory object with default values */ private createNewRendezvousHistory; /** * Helper function to assist in the creation of a RendezvousLineInfo * @param fileName processed file name * @param lineNumber occurrence line number * @param duration how long the rendezvous took to complete, if not supplied it is assumed to be zero */ private createLineObject; /** * Helper function to convert the duration to a float or return 0.00 * @param duration how long the rendezvous took to complete, if not supplied it is assumed to be zero */ private getTime; /** * Destroy/tear down this class */ destroy(): Promise; } export interface RendezvousHistory { hitCount: number; occurrences: Record; totalTime: number; type: ElementType; zeroCostHitCount: number; } interface RendezvousFileInfo { hitCount: number; occurrences: Record; totalTime: number; type: ElementType; zeroCostHitCount: number; } interface RendezvousLineInfo { clientLineNumber: number; clientPath: string; hitCount: number; totalTime: number; type: ElementType; } interface EcpRendezvousData { trackingEnabled: boolean; items: EcpRendezvousItem[]; } interface EcpRendezvousItem { id: string; startTime: string; endTime: string; lineNumber: string; file: string; } type ElementType = 'fileInfo' | 'historyInfo' | 'lineInfo'; export {};