-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple macro benchmark #2304
Open
simonbaird
wants to merge
3
commits into
enterprise-contract:main
Choose a base branch
from
simonbaird:EC-968
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Simple macro benchmark #2304
+1,427
−21
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implementation of a simple macro benchmark executing `ec validate image` with the fixed state and no external dependencies. For this the OCI distribution registry is run in a container with the data from the `benchmark/simple/data.tar.gz` that contains the copy of all images/blobs that the command and the policy rules currently access and the git repository. The benchmark outputs in the golang standard benchmark format that can be utilized with tools in the golang benchmarking ecosystem. Due to the global `downloadCache` variable in `internal/policy/source/source.go` the benchmark cannot be run in parallel. So only invoking the benchmark once is currently possible. Reference: https://issues.redhat.com/browse/EC-968
The motivation is to include the change from https://issues.redhat.com/browse/EC-1041 .
Closed
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2304 +/- ##
==========================================
- Coverage 72.79% 67.69% -5.11%
==========================================
Files 89 101 +12
Lines 7687 8284 +597
==========================================
+ Hits 5596 5608 +12
- Misses 2091 2676 +585
Flags with carried forward coverage won't be shown. Click here to find out more.
|
To try this out:
|
What I'm getting:
|
just tried from the Mac. ❱ benchmark_simple
pkg: golang.org/x/benchmarks
goos: darwin
goarch: arm64
driver.go:212: Benchmarking 1 iterations
WARN[0021] Encountered error while checking for Image Index: unable to fetch descriptior for container image quay.io/redhat-user-workloads/rhtap-contract-tenant/golden-container/golden-container@sha256:166e38c156fa81d577a7ba7a948b68c79005a06e302779d1bebc7d31e8bea315: Get "https://quay.io/v2/": tls: failed to verify certificate: x509: “benchmark.ec” certificate is not standards compliant
panic: pulling policy: failed to resolve quay.io/enterprise-contract/ec-release-policy@sha256:64617f0c45689ef7152c5cfbd4cd5709a3126e4ab7482eb6acd994387fe2d4ba: Get "https://quay.io/v2/enterprise-contract/ec-release-policy/manifests/sha256:64617f0c45689ef7152c5cfbd4cd5709a3126e4ab7482eb6acd994387fe2d4ba": tls: failed to verify certificate: x509: “benchmark.ec” certificate is not standards compliant
goroutine 33 [running]:
main.ec.func1()
/Users/jstuart/Documents/repos/ec-cli/benchmark/simple/simple.go:114 +0x168
golang.org/x/benchmarks/driver.Parallel.func1()
/Users/jstuart/go/pkg/mod/golang.org/x/[email protected]/driver/driver.go:287 +0x60
created by golang.org/x/benchmarks/driver.Parallel in goroutine 1
/Users/jstuart/go/pkg/mod/golang.org/x/[email protected]/driver/driver.go:284 +0x84
exit status 2
make: *** [Makefile:148: benchmark_simple] Error 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation of a simple macro benchmark executing
ec validate image
with the fixed state and no external dependencies.For this the OCI distribution registry is run in a container with the data from the
benchmark/simple/data.tar.gz
that contains the copy of all images/blobs that the command and the policy rules currently access and the git repository.The benchmark outputs in the golang standard benchmark format that can be utilized with tools in the golang benchmarking ecosystem.
Due to the global
downloadCache
variable ininternal/policy/source/source.go
the benchmark cannot be run in parallel. So only invoking the benchmark once is currently possible.Reference: https://issues.redhat.com/browse/EC-968
(Original PR at #2192)