Sha256: 4e164af924d436e01503a2198929a72eada5e38b0d1b78bdcea91e998c4cc358
Contents?: true
Size: 803 Bytes
Versions: 15
Compression:
Stored size: 803 Bytes
Contents
MetricFu.reporting_require { 'graphs/grapher' } module MetricFu class StatsGrapher < Grapher attr_accessor :loc_counts, :lot_counts, :labels def self.metric :stats end def initialize super self.loc_counts = [] self.lot_counts = [] self.labels = {} end def get_metrics(metrics, date) if metrics && metrics[:stats] self.loc_counts.push(metrics[:stats][:codeLOC].to_i) self.lot_counts.push(metrics[:stats][:testLOC].to_i) self.labels.update( { self.labels.size => date }) end end def title 'Stats: LOC & LOT' end def data [ ['LOC', @loc_counts.join(',')], ['LOT', @lot_counts.join(',')], ] end def output_filename 'stats.js' end end end
Version data entries
15 entries across 15 versions & 1 rubygems