mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Add start time on perf trace because it seems some steps haven't been recorded. (#35282)
The new trace log looks like
```
http start=2025-08-14 15:03:04 duration=0.6978s http.route=/
  http.func start=2025-08-14 15:03:04 duration=0.6978s func=common.ForwardedHeadersHandler.ForwardedHeaders
    http.func start=2025-08-14 15:03:04 duration=0.6978s func=routing.(*requestRecordsManager).handler-fm
      http.func start=2025-08-14 15:03:04 duration=0.6978s func=gzhttp.NewWrapper
        http.func start=2025-08-14 15:03:04 duration=0.6975s func=session.Sessioner
          http.func start=2025-08-14 15:03:04 duration=0.6973s func=context.Contexter
```
			
			
This commit is contained in:
		| @@ -40,7 +40,7 @@ func (t *traceBuiltinSpan) toString(out *strings.Builder, indent int) { | ||||
| 	if t.ts.endTime.IsZero() { | ||||
| 		out.WriteString(" duration: (not ended)") | ||||
| 	} else { | ||||
| 		fmt.Fprintf(out, " duration=%.4fs", t.ts.endTime.Sub(t.ts.startTime).Seconds()) | ||||
| 		fmt.Fprintf(out, " start=%s duration=%.4fs", t.ts.startTime.Format("2006-01-02 15:04:05"), t.ts.endTime.Sub(t.ts.startTime).Seconds()) | ||||
| 	} | ||||
| 	for _, a := range t.ts.attributes { | ||||
| 		out.WriteString(" ") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao