mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Kubernetes benchmarks: Add profiling to benchmarks that were missing it.
(Diffbased) PiperOrigin-RevId: 702928932
This commit is contained in:
committed by
gVisor bot
parent
6abc135b3b
commit
d793733525
@@ -358,6 +358,7 @@ go_library(
|
||||
deps = [
|
||||
"//test/gpu/ollama",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
"//test/kubernetes/testcluster",
|
||||
@@ -392,6 +393,7 @@ go_library(
|
||||
deps = [
|
||||
"//test/gpu/stablediffusion",
|
||||
"//test/kubernetes",
|
||||
"//test/kubernetes/benchmarks/profiling",
|
||||
"//test/kubernetes/benchmetric",
|
||||
"//test/kubernetes/k8sctx",
|
||||
"//test/kubernetes/testcluster",
|
||||
|
||||
@@ -28,6 +28,7 @@ import (
|
||||
|
||||
"gvisor.dev/gvisor/test/gpu/ollama"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
@@ -235,6 +236,11 @@ func BenchmarkOllama(ctx context.Context, t *testing.T, k8sCtx k8sctx.Kubernetes
|
||||
t.Fatalf("cannot reset namespace: %v", err)
|
||||
}
|
||||
defer benchmarkNS.Cleanup(ctx)
|
||||
endProfiling, err := profiling.MaybeSetup(ctx, t, k8sCtx, cluster, benchmarkNS)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to setup profiling: %v", err)
|
||||
}
|
||||
defer endProfiling()
|
||||
|
||||
logWithTime := func(t *testing.T, format string, values ...any) {
|
||||
t.Logf("[%v] "+format, append([]any{time.Now().Format(time.TimeOnly)}, values...)...)
|
||||
|
||||
@@ -24,6 +24,7 @@ import (
|
||||
|
||||
"gvisor.dev/gvisor/test/gpu/stablediffusion"
|
||||
k8s "gvisor.dev/gvisor/test/kubernetes"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmarks/profiling"
|
||||
"gvisor.dev/gvisor/test/kubernetes/benchmetric"
|
||||
"gvisor.dev/gvisor/test/kubernetes/k8sctx"
|
||||
"gvisor.dev/gvisor/test/kubernetes/testcluster"
|
||||
@@ -112,6 +113,11 @@ func RunStableDiffusionXL(ctx context.Context, t *testing.T, k8sCtx k8sctx.Kuber
|
||||
t.Fatalf("cannot reset namespace: %v", err)
|
||||
}
|
||||
defer benchmarkNS.Cleanup(ctx)
|
||||
endProfiling, err := profiling.MaybeSetup(ctx, t, k8sCtx, cluster, benchmarkNS)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to setup profiling: %v", err)
|
||||
}
|
||||
defer endProfiling()
|
||||
|
||||
imageName, err := k8sCtx.ResolveImage(ctx, stableDiffusionImage)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user