Skip to content

Commit

Permalink
[test] Log to ETW for benchmarks; retry layer removal (microsoft#1947)
Browse files Browse the repository at this point in the history
Write logs to ETW instead of stdout when running benchmarks to mimic
actual deployments.
Add log level to `Run-Test.ps1` helper script.

Add `RemoveAll` function that wraps and retries `os.RemoveAll` (waiting
in between attempts) since the OS may take a while to remove locks on a
directory after handles are closed.

Bug: defer uVM cleanup after creation (not start) during tests.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
  • Loading branch information
helsaawy authored Oct 25, 2023
1 parent e081971 commit 6844d69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions log/nopformatter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package log

import (
"github.com/sirupsen/logrus"
)

type NopFormatter struct{}

var _ logrus.Formatter = NopFormatter{}

// Format does nothing and returns a nil slice.
func (NopFormatter) Format(*logrus.Entry) ([]byte, error) { return nil, nil }

0 comments on commit 6844d69

Please sign in to comment.