-
Notifications
You must be signed in to change notification settings - Fork 129
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
RUM-5551 Add Benchmark Tests Project #1977
Conversation
eac66a0
to
a6ad807
Compare
added DOCS-8608 to review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🙌
...markTests/BenchmarkTests.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
var window: UIWindow? | ||
|
||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | ||
let info = try! TestInfo() // crash if test info are missing or malformed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to log an error here for debugging purposes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception error will give us enough info to troubleshoot 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine real implementations for export
, flush
and shutdown
will come later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, implementation will come later 👍
a6ad807
to
bc24e9d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start for continuous benchmarking project 🚀! I really like the work done on shell scripts, CI secrets and makefiles - notably reusing and sharing existing bits. This PR greatly follows conventions started with GitLab migration 🏅.
I left few comments, notably touching on two areas:
- Benchmark project configuration: we should aim at providing most of it through
xcconfig
files rather than utilizingpbxproj
overrides (this is hard to maintain). - Level of details in
README.md
- this file doesn't look future-proof in its current state. Details will change, butREADME.md
will be likely forgotten. Also, it doesn't cover enough details for setting up s8s tests and I don't even think they should belong to this file. We must document all aspects critical to team's operations, likely in iOS > Automations > Benchmark Tests Confluence page (can be done later, ofc). 👈 This is a lesson learnt from Shopist iOS and E2E Tests automations, which both includeREADME.md
but working on s8s tests requires reverse-engineering of existing setup. For that reason we should clearly separate what we want from README (high-level overview for public audience) vs Confluence (internal details for the team).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review
bc24e9d
to
d76d2a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! 🪨 💯 Please also consider the suggestion to .gitlab-ci.yml
- seems omitted.
pgrep -q Xcode && killall Xcode && echo_warn "- Xcode killed" || echo_succ "- Xcode not running" | ||
sleep 0.5 && echo "- launching" # Sleep, otherwise, if Xcode was running it often fails with "procNotFound: no eligible process with specified descriptor" | ||
open --env DD_TEST_UTILITIES_ENABLED "$TEST_WORKSPACE" | ||
open --new --env DD_TEST_UTILITIES_ENABLED "$TEST_WORKSPACE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏅 nice!
Co-authored-by: Maciek Grzybowski <[email protected]>
|
||
### Synthetics Configuration | ||
|
||
Please refer to [Confluence page (internal)](https://datadoghq.atlassian.net/wiki/spaces/RUMP/pages/3981476482/Benchmarks+iOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last minor suggestion, but otherwise looks good!
|
||
## CI | ||
|
||
CI continuously builds, signs, and uploads a runner application to Synthetics which runs predefined tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI continuously builds, signs, and uploads a runner application to Synthetics which runs predefined tests. | |
CI continuously builds, signs, and uploads a runner application to Synthetics, which runs predefined tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, adding in a follow-up PR 👍
What and why?
Introduce the Benchmark project for continuously measure the SDK performances in a host application. This PR includes the following:
How?
Benchmark Tests Project
The
BenchmarkTests/BenchmarkTests.xcodeproj
includes a Runner application with simple logic the select a scenario from env variable. The project defines the same abstraction asE2ETests
to define scenarios.The
BenchmarkTests/Benchmarks/Package.swift
depends onopentelemetry-swift
and will later define metrics collector and exporter to Datadog.CI
CI configuration is almost identical as
E2ETests
to build, sign, and upload the api to s8s.The added
tools/utils/code-sign.sh
allow sharing the steps to install the provisioning profile and certificate on the build machine.Review checklist