File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
firebase-perf/src/main/java/com/google/firebase/perf/transport Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 51
51
import com .google .firebase .perf .v1 .PerfMetricOrBuilder ;
52
52
import com .google .firebase .perf .v1 .TraceMetric ;
53
53
import java .lang .ref .WeakReference ;
54
+ import java .text .DecimalFormat ;
54
55
import java .util .Collections ;
55
56
import java .util .Locale ;
56
57
import java .util .Map ;
@@ -617,9 +618,9 @@ private static String getLogcatMsg(TraceMetric traceMetric) {
617
618
long durationInUs = traceMetric .getDurationUs ();
618
619
return String .format (
619
620
Locale .ENGLISH ,
620
- "trace metric: %s (duration: %.4fms )" ,
621
+ "trace metric: %s (duration: %sms )" ,
621
622
traceMetric .getName (),
622
- durationInUs / 1000.0 );
623
+ new DecimalFormat ( "#.####" ). format ( durationInUs / 1000.0 ) );
623
624
}
624
625
625
626
private static String getLogcatMsg (NetworkRequestMetric networkRequestMetric ) {
@@ -635,10 +636,10 @@ private static String getLogcatMsg(NetworkRequestMetric networkRequestMetric) {
635
636
636
637
return String .format (
637
638
Locale .ENGLISH ,
638
- "network request trace: %s (responseCode: %s, responseTime: %.4fms )" ,
639
+ "network request trace: %s (responseCode: %s, responseTime: %sms )" ,
639
640
networkRequestMetric .getUrl (),
640
641
responseCode ,
641
- durationInUs / 1000.0 );
642
+ new DecimalFormat ( "#.####" ). format ( durationInUs / 1000.0 ) );
642
643
}
643
644
644
645
private static String getLogcatMsg (GaugeMetric gaugeMetric ) {
You can’t perform that action at this time.
0 commit comments