Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

Commit 8e926aa

Browse files
committed
[GIT]
1 parent 0123994 commit 8e926aa

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

org.eclipse.jgit.telemetry/src/main/java/org/eclipse/jgit/telemetry/TelemetryAspect.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,16 @@ private void recordTrace(ProceedingJoinPoint joinPoint, long duration, Throwable
6262
}
6363

6464
private void log(Span span, String spanName, long duration) {
65-
System.out.println("🚀 " +
66-
span.getSpanContext().getTraceId() + " > " +
67-
span.getSpanContext().getSpanId() + " > " +
68-
spanName + " took: " + duration + " ns");
65+
System.out.printf("🚀 %s > %s > %s took: %s%n",
66+
span.getSpanContext().getTraceId(),
67+
span.getSpanContext().getSpanId(),
68+
spanName,
69+
formatDuration(duration));
70+
}
71+
72+
private String formatDuration(long nanoseconds) {
73+
double ms = nanoseconds / 1_000_000.0;
74+
return String.format("%.2f ms", ms);
6975
}
7076

7177
private String getSpanName(ProceedingJoinPoint joinPoint) {

0 commit comments

Comments
 (0)