WalkerMarkdownService

Service for generating and saving walker markdown reports.

Features:

  • Listens to walker events via tick callback
  • Accumulates strategy results per walker using memoized storage
  • Generates markdown tables with detailed strategy comparison
  • Saves reports to disk in logs/walker/{walkerName}.md
constructor();
loggerService: any

Logger service for debug output

getStorage: any

Memoized function to get or create ReportStorage for a walker. Each walker gets its own isolated storage instance.

tick: any

Processes walker progress events and accumulates strategy results. Should be called from walkerEmitter.

getData: (walkerName: string, symbol: string, metric: WalkerMetric, context: { exchangeName: string; frameName: string; }) => Promise<IWalkerResults>

Gets walker results data from all strategy results. Delegates to ReportStorage.getData().

getReport: (walkerName: string, symbol: string, metric: WalkerMetric, context: { exchangeName: string; frameName: string; }) => Promise<string>

Generates markdown report with all strategy results for a walker. Delegates to ReportStorage.getReport().

dump: (walkerName: string, symbol: string, metric: WalkerMetric, context: { exchangeName: string; frameName: string; }, path?: string) => Promise<void>

Saves walker report to disk. Creates directory if it doesn't exist. Delegates to ReportStorage.dump().

clear: (walkerName?: string) => Promise<void>

Clears accumulated result data from storage. If walkerName is provided, clears only that walker's data. If walkerName is omitted, clears all walkers' data.

init: (() => Promise<void>) & ISingleshotClearable

Initializes the service by subscribing to walker events. Uses singleshot to ensure initialization happens only once. Automatically called on first use.