cmd/golsp: log elapsed times in milliseconds rather than microseconds.
Language servers provided by Microsoft seem to use Date.Now() for calculating elapsed times. In javascript and typescript Date.Now() reports milliseconds. Change-Id: Ic12fc4a1d31f2548d8808b8b22aba80c44f000c3 Reviewed-on: https://go-review.googlesource.com/c/155018 Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
537d06c362
commit
3ad2d988d5
|
@ -97,7 +97,8 @@ func (s *server) Run(ctx context.Context, args ...string) error {
|
||||||
}
|
}
|
||||||
fmt.Fprint(outx, "'")
|
fmt.Fprint(outx, "'")
|
||||||
if elapsed >= 0 {
|
if elapsed >= 0 {
|
||||||
fmt.Fprintf(outx, " in %vms", elapsed.Nanoseconds()/1000)
|
msec := int(elapsed.Round(time.Millisecond) / time.Millisecond)
|
||||||
|
fmt.Fprintf(outx, " in %dms", msec)
|
||||||
}
|
}
|
||||||
params := string(*payload)
|
params := string(*payload)
|
||||||
if params == "null" {
|
if params == "null" {
|
||||||
|
|
Loading…
Reference in New Issue