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

Add script to capture travis build durations #2541

Merged
merged 2 commits into from
Jun 22, 2017
Merged

Add script to capture travis build durations #2541

merged 2 commits into from
Jun 22, 2017

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Jun 20, 2017

Here's the last 40 days of travis build durations:
image

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

EDIT: i've amended the script to tag where the build is from so we can see just master branch builds too:
image

spreadsheet: https://docs.google.com/spreadsheets/d/197M4SRTdDbbpg4uRDCr-tI5l48L2qsAGkxIcIncKKew/edit#gid=0

cc @wardpeet

@stramel
Copy link
Contributor

stramel commented Jun 20, 2017

@paulirish What is the unit on Y-axis?

@paulirish
Copy link
Member Author

@stramel good question :). Y axis is time in seconds.
500s is a little bit over 8 minutes.

Copy link
Member

@brendankenny brendankenny left a 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
Copy link
Member

Choose a reason for hiding this comment

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

what was this for?

Copy link
Member Author

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?
Copy link
Member

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

@paulirish paulirish merged commit d9ccd2e into master Jun 22, 2017
@paulirish paulirish deleted the logdurations branch June 22, 2017 01:23
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

3 participants