feat: add qemu start up time before ssh and test duration logs
This commit is contained in:
parent
eaba233ca3
commit
2f9b5d615b
10
pew.go
10
pew.go
@ -641,6 +641,12 @@ func (cmd PewCmd) testArtifact(swg *sizedwaitgroup.SizedWaitGroup,
|
|||||||
Logger()
|
Logger()
|
||||||
|
|
||||||
slog.Info().Msg("start")
|
slog.Info().Msg("start")
|
||||||
|
testStart := time.Now()
|
||||||
|
defer func() {
|
||||||
|
slog.Debug().Str("test_duration",
|
||||||
|
time.Now().Sub(testStart).String()).
|
||||||
|
Msg("")
|
||||||
|
}()
|
||||||
|
|
||||||
kernel := qemu.Kernel{KernelPath: ki.KernelPath, InitrdPath: ki.InitrdPath}
|
kernel := qemu.Kernel{KernelPath: ki.KernelPath, InitrdPath: ki.InitrdPath}
|
||||||
if cmd.RootFS != "" {
|
if cmd.RootFS != "" {
|
||||||
@ -678,6 +684,7 @@ func (cmd PewCmd) testArtifact(swg *sizedwaitgroup.SizedWaitGroup,
|
|||||||
q.Timeout = 0
|
q.Timeout = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qemuStart := time.Now()
|
||||||
err = q.Start()
|
err = q.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error().Err(err).Msg("qemu start")
|
slog.Error().Err(err).Msg("qemu start")
|
||||||
@ -743,6 +750,9 @@ func (cmd PewCmd) testArtifact(swg *sizedwaitgroup.SizedWaitGroup,
|
|||||||
result.InternalError = err
|
result.InternalError = err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
slog.Debug().Str("qemu_startup_duration",
|
||||||
|
time.Now().Sub(qemuStart).String()).
|
||||||
|
Msg("ssh is available")
|
||||||
|
|
||||||
remoteTest, err := copyTest(q, cmd.Test, ka)
|
remoteTest, err := copyTest(q, cmd.Test, ka)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user