-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Add script to capture travis build durations #2541
Conversation
@paulirish What is the unit on Y-axis? |
@stramel good question :). Y axis is time in seconds. |
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.
no clue about good ruby coding style, but seems like plausibly good code :) Time.now.to_date.prev_day($days_of_builds_to_consider).to_time
is a sweet API.
Could wait for someone else with more ruby experience, but since it's pretty simple and since this is mostly for running on your machine, I'm good with it.
def log_durations | ||
repository = Travis::Repository.find('GoogleChrome/lighthouse') | ||
repository.each_build do |build| | ||
# next unless Integer(build.number) < 8283 |
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.
what was this for?
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.
leaving it in in case people want to look for a specific range.
repository.each_build do |build| | ||
# next unless Integer(build.number) < 8283 | ||
|
||
next if build.started_at.nil? |
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.
maybe add a comment mentioning when this would occur
Here's the last 40 days of travis build durations:
![image](https://user-images.githubusercontent.com/39191/27314836-116d8808-552b-11e7-8578-4ddc7c4f826a.png)
Pretty cool data. Halfway down the X axis you'll see the variance kick off. AFAICT, this seems to be travis's fault. It starts right when the "fix appveyor" commits land on master. (around the #7972's of build numbers) But these commits ONLY touch appveyor.yml, so they couldn't matter less to Travis.
![image](https://user-images.githubusercontent.com/39191/27314766-a00e7c94-552a-11e7-8d31-086783309d21.png)
EDIT: i've amended the script to tag where the build is from so we can see just master branch builds too:
![image](https://user-images.githubusercontent.com/39191/27314810-fde9d19c-552a-11e7-97b3-bf3bc38111da.png)
spreadsheet: https://docs.google.com/spreadsheets/d/197M4SRTdDbbpg4uRDCr-tI5l48L2qsAGkxIcIncKKew/edit#gid=0
cc @wardpeet