Skip to content

Commit

Permalink
Unblock perfdash upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Thrivikraman committed Jun 15, 2021
1 parent ef63227 commit 5d78910
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion perfdash/Makefile
@@ -1,7 +1,7 @@
all: push

# See deployment.yaml for the version currently running-- bump this ahead before rebuilding!
TAG = 2.33
TAG = 2.34

REPO = gcr.io/k8s-testimages

Expand Down
5 changes: 2 additions & 3 deletions perfdash/deployment.yaml
Expand Up @@ -15,9 +15,7 @@ spec:
spec:
containers:
- name: perfdash
# Version 2.33 consumes > 32GiB of memory.
# TODO: Introduce 2.34 version which conditionally disables functionality added in 2.32 and disable it in this perf-dash instance.
image: gcr.io/k8s-testimages/perfdash:2.32
image: gcr.io/k8s-testimages/perfdash:2.34
command:
- /perfdash
- --www=true
Expand All @@ -26,6 +24,7 @@ spec:
- --builds=100
- --githubConfigDir=https://api.github.com/repos/kubernetes/test-infra/contents/config/jobs/kubernetes/sig-scalability
- --githubConfigDir=https://api.github.com/repos/kubernetes/test-infra/contents/config/jobs/kubernetes/sig-release/release-branch-jobs
- --allow-parsers-matching-all-tests=false
imagePullPolicy: Always
ports:
- name: status
Expand Down
15 changes: 10 additions & 5 deletions perfdash/metrics-downloader.go
Expand Up @@ -42,15 +42,17 @@ type DownloaderOptions struct {

// Downloader that gets data about results from a storage service (GCS) repository.
type Downloader struct {
MetricsBkt MetricsBucket
Options *DownloaderOptions
MetricsBkt MetricsBucket
Options *DownloaderOptions
allowParsersForAllTests bool
}

// NewDownloader creates a new Downloader.
func NewDownloader(opt *DownloaderOptions, bkt MetricsBucket) *Downloader {
func NewDownloader(opt *DownloaderOptions, bkt MetricsBucket, allowAllParsers bool) *Downloader {
return &Downloader{
MetricsBkt: bkt,
Options: opt,
MetricsBkt: bkt,
Options: opt,
allowParsersForAllTests: allowAllParsers,
}
}

Expand Down Expand Up @@ -120,6 +122,9 @@ func (g *Downloader) getJobData(wg *sync.WaitGroup, result JobToCategoryData, re
for categoryLabel, categoryMap := range tests.Descriptions {
for testLabel, testDescriptions := range categoryMap {
for _, testDescription := range testDescriptions {
if !g.allowParsersForAllTests && testDescription.Name == "" {
continue
}
filePrefix := testDescription.OutputFilePrefix
if testDescription.Name != "" {
filePrefix = fmt.Sprintf("%v_%v", filePrefix, testDescription.Name)
Expand Down
4 changes: 3 additions & 1 deletion perfdash/perfdash.go
Expand Up @@ -56,6 +56,8 @@ var (

// AWS S3 Specific flags
awsRegion = pflag.String("aws-region", "us-west-2", "AWS region of the S3 bucket")

allowParsersForAllTests = pflag.Bool("allow-parsers-matching-all-tests", true, "Allow parsers for common measurement matching any test name")
)

func initDownloaderOptions() {
Expand Down Expand Up @@ -103,7 +105,7 @@ func run() error {
return fmt.Errorf("error creating metrics bucket downloader: %v", err)
}

downloader := NewDownloader(options, metricsBucket)
downloader := NewDownloader(options, metricsBucket, *allowParsersForAllTests)
result := make(JobToCategoryData)

if !*www {
Expand Down

0 comments on commit 5d78910

Please sign in to comment.