Skip to content
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

Added an option to allow submitting test-perf result to perfherder #14147

Merged
merged 1 commit into from Dec 1, 2016

Conversation

shinglyu
Copy link
Contributor

@shinglyu shinglyu commented Nov 9, 2016

This patch enables us to run ./mach test-perf --submit in CI to submit the result to perfherder. r? @aneeshusa


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • [] These changes fix #__ (github issue number if applicable).
  • There are tests for these changes OR
  • These changes do not require tests because too many manual setup required to test it

This change is Reviewable

@highfive
Copy link

highfive commented Nov 9, 2016

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/servo/testing_commands.py
  • @aneeshusa: etc/ci/performance/README.md, etc/ci/performance/test_all.sh, etc/ci/performance/test_perf.sh

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 9, 2016
@@ -7,27 +7,21 @@ Servo Page Load Time Test

# Basic Usage

## Prepare the test runner
If you want to run a performance test for your servo build. Simply go to the top-level servo directory and run `./mach test-perf`. The test result JOSN will be saved to `etc/ci/performance/output/`. You can compare two test results with the `test_differ.py` script. Run `python test_differ.py -h` for instructions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Fixing style,

"./mach test-perf can be used to run a performance test on your servo build. The test result JSON will be saved to etc/ci/performance/output/. You can then run python test_differ.py to compare these two test results. Run python test_differ.py -h for instructions."

* Run `prepare_manifest.sh` to transform the tp5n manifest to our format
* Install the Python3 `treeherder-client` package. For example, to install it in a virtualenv: `python3 -m virtualenv venv; source venv/bin/activate; pip install "treeherder-client>=3.0.0"`
# Setup for CI machine

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be done here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This H1 is for the subsections "For Servo" and "For Gecko", I'll change them to "CI for Servo" to make it clear.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, never mind 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But yeah, it could just be "CI for Servo"

Copy link
Contributor

@aneeshusa aneeshusa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few nits, looks like this will be useful!

@@ -34,4 +34,9 @@ pip install "treeherder-client>=3.0.0"
mkdir -p servo
mkdir -p output
./git_log_to_json.sh > servo/revision.json && \
./test_all.sh --servo

if [[ "${1}" = "--submit" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to guard this by checking the number of arguments before looking at any of their values.

@@ -34,4 +34,9 @@ pip install "treeherder-client>=3.0.0"
mkdir -p servo
mkdir -p output
./git_log_to_json.sh > servo/revision.json && \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the && \ at the end.

@@ -34,4 +34,9 @@ pip install "treeherder-client>=3.0.0"
mkdir -p servo
mkdir -p output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to make this output dir? Add a comment or remove it.

return call(["bash", "test_perf.sh"],
cmd = ["bash", "test_perf.sh"]
if submit:
cmd += ["--submit"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check that the Treeherder environment variables are set if submit is True before we actually run the command, to improve the user experience (e.g. if you don't read carefully).

@aneeshusa aneeshusa added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 15, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-needs-code-changes Changes have not yet been made that were requested by a reviewer. labels Nov 16, 2016
@wafflespeanut
Copy link
Contributor

./etc/ci/performance/test_perf.sh:38: variable substitutions should use the full "${VAR}" form

@wafflespeanut
Copy link
Contributor

@aneeshusa This is waiting on your review.

@shinglyu
Copy link
Contributor Author

@aneeshusa Since there is no major issue, and I need to land this ASAP, I'll ask @larsbergstrom for the final sign-off. Hope you don't mind!

@larsbergstrom
Copy link
Contributor

@bors-servo r=larsbergstrom,aneeshusa

We can chat more in Hawaii if there are any follow-ups needed here :-)

@bors-servo
Copy link
Contributor

📌 Commit 4f377ac has been approved by larsbergstrom,aneeshusa

@highfive highfive assigned larsbergstrom and unassigned aneeshusa Nov 29, 2016
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 29, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit 4f377ac with merge 90e77f9...

bors-servo pushed a commit that referenced this pull request Nov 29, 2016
…eshusa

Added an option to allow submitting test-perf result to perfherder

<!-- Please describe your changes on the following line: -->

This patch enables us  to run `./mach test-perf --submit` in CI to submit the result to perfherder. r? @aneeshusa

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because too many manual setup required to test it

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->

---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14147)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 29, 2016
@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #14194) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Nov 29, 2016
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Dec 1, 2016
@shinglyu
Copy link
Contributor Author

shinglyu commented Dec 1, 2016

The conflict is in the README file, so no big deal. The test seems to be some network error while running filter-intermittents

@shinglyu
Copy link
Contributor Author

shinglyu commented Dec 1, 2016

@bors-servo r=larsbergstrom,aneeshusa

@bors-servo
Copy link
Contributor

📌 Commit ddd0322 has been approved by larsbergstrom,aneeshusa

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. S-needs-rebase There are merge conflict errors. labels Dec 1, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit ddd0322 with merge 7d66bd7...

bors-servo pushed a commit that referenced this pull request Dec 1, 2016
…eshusa

Added an option to allow submitting test-perf result to perfherder

<!-- Please describe your changes on the following line: -->

This patch enables us  to run `./mach test-perf --submit` in CI to submit the result to perfherder. r? @aneeshusa

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because too many manual setup required to test it

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->

---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14147)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

@bors-servo bors-servo merged commit ddd0322 into servo:master Dec 1, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants