@@ -65,7 +65,12 @@ private function exportLeaderPrinter(array $data): void
6565
6666 public function exportSnapshot (Snapshot $ snapshot ): void
6767 {
68- $ this ->exportLeaderPrinter ($ snapshot ->toHuman ());
68+ $ data = $ snapshot ->toHuman ();
69+ $ location = new CallLocation ($ snapshot ->originPath , $ snapshot ->originLine );
70+ unset($ data ['origin_path ' ], $ data ['origin_line ' ]);
71+ $ data ['call_location ' ] = Ide::fromEnv ()->link ($ location , null , AnsiStyle::BrightCyan, AnsiStyle::Bold);
72+
73+ $ this ->exportLeaderPrinter ($ data );
6974 }
7075
7176 public function exportMetrics (Result |Span |Metrics $ metrics ): void
@@ -86,10 +91,11 @@ public function exportSpan(Result|Span $span): void
8691 Span::class => $ span ,
8792 };
8893
94+ $ ide = Ide::fromEnv ();
8995 $ this ->exportLeaderPrinter ([
9096 'label ' => $ source ->label ,
91- 'call_location_start ' => Ide:: fromEnv () ->link ($ source ->range ->start , null , AnsiStyle::White ),
92- 'call_location_end ' => Ide:: fromEnv () ->link ($ source ->range ->end , null , AnsiStyle::White ),
97+ 'call_location_start ' => $ ide ->link ($ source ->range ->start , null , AnsiStyle::BrightCyan, AnsiStyle::Bold ),
98+ 'call_location_end ' => $ ide ->link ($ source ->range ->end , null , AnsiStyle::BrightCyan, AnsiStyle::Bold ),
9399 ]);
94100 $ this ->exportMetrics ($ source ->metrics );
95101 }
@@ -211,7 +217,7 @@ public function exportTimeline(Timeline $timeline, ?callable $filter = null): vo
211217 $ data = $ snapshot ->toHuman ();
212218 $ tableRenderer ->addRow ([
213219 $ data ['label ' ],
214- $ data ['origin_path ' ]. ' : ' . $ data ['origin_line ' ],
220+ Ide:: fromEnv ()-> link ( new CallLocation ( $ data ['origin_path ' ], ( int ) $ data ['origin_line ' ]), ' UNKNOWN_PROJECT ' , AnsiStyle::Bold, AnsiStyle::BrightCyan) ,
215221 $ snapshot ->timestamp ->format ('U.u ' ),
216222 DurationUnit::format ($ snapshot ->cpuUserTime + $ snapshot ->cpuSystemTime , 3 ),
217223 $ data ['memory_usage ' ],
0 commit comments