1313use Bakame \Stackwatch \Result ;
1414use Bakame \Stackwatch \Snapshot ;
1515use Bakame \Stackwatch \Span ;
16+ use Bakame \Stackwatch \Statistics ;
1617use Bakame \Stackwatch \Translator ;
1718
1819use function array_keys ;
@@ -52,18 +53,6 @@ public function writeln(string $content): int|false
5253 return fwrite ($ this ->stream , $ content ."\n" );
5354 }
5455
55- public function exportMetrics (Result |Span |Metrics $ metrics ): void
56- {
57- /** @var Metrics $source */
58- $ source = match ($ metrics ::class) {
59- Result::class => $ metrics ->span ->metrics ,
60- Span::class => $ metrics ->metrics ,
61- Metrics::class => $ metrics ,
62- };
63-
64- $ this ->writeLeaderPrinter ($ source ->toHuman ());
65- }
66-
6756 /**
6857 * @param array<string, string> $data
6958 */
@@ -79,11 +68,28 @@ public function exportSnapshots(Snapshot $snapshot): void
7968 $ this ->writeLeaderPrinter ($ snapshot ->toHuman ());
8069 }
8170
82- public function exportEnvironement (Environment $ environment ): void
71+ public function exportMetrics (Result |Span |Metrics $ metrics ): void
72+ {
73+ /** @var Metrics $source */
74+ $ source = match ($ metrics ::class) {
75+ Result::class => $ metrics ->span ->metrics ,
76+ Span::class => $ metrics ->metrics ,
77+ Metrics::class => $ metrics ,
78+ };
79+
80+ $ this ->writeLeaderPrinter ($ source ->toHuman ());
81+ }
82+
83+ public function exportEnvironment (Environment $ environment ): void
8384 {
8485 $ this ->writeLeaderPrinter ($ environment ->toHuman ());
8586 }
8687
88+ public function exportStatistics (Statistics $ statistics ): void
89+ {
90+ $ this ->writeLeaderPrinter ($ statistics ->toHuman ());
91+ }
92+
8793 public function exportReport (Report $ report ): void
8894 {
8995 $ reportData = $ report ->toHuman ();
0 commit comments