Class: Ci::Charts::BuildTime

Inherits:
Chart
  • Object
show all
Defined in:
lib/ci/charts.rb

Instance Attribute Summary

Attributes inherited from Chart

#build_times, #labels, #project, #success, #total

Instance Method Summary collapse

Methods inherited from Chart

#initialize, #push

Constructor Details

This class inherits a constructor from Ci::Charts::Chart

Instance Method Details

#collectObject


62
63
64
65
66
67
68
69
# File 'lib/ci/charts.rb', line 62

def collect
  commits = project.ci_commits.last(30)

  commits.each do |commit|
    @labels << commit.short_sha
    @build_times << (commit.duration / 60)
  end
end