Sha256: 054d641b253499642b39450a67e6ec327ab816d127555c0af492c3ec9a8dd624
Contents?: true
Size: 648 Bytes
Versions: 3
Compression:
Stored size: 648 Bytes
Contents
#!/usr/bin/env ruby require_relative File.join '..', 'lib', 'git_commit_size_scraper' include GitCommitSizeScraper include StatisticalArray def numsep num p = /(?<=\d)(?=(?:\d{3})+(\.\d+)?\z)/ num.round(2).to_s.gsub p, ?, end def report values values = StatsArray.new values puts puts "Average: %s bytes" % numsep(values.median) puts "Median : %s bytes" % numsep(values.avg) puts "Std Dev: %s bytes" % numsep(values.std_dev.round(2)) puts "Total : %s bytes" % numsep(values.sum) end git = Scraper.new ARGV count = git.commits.count puts "Walking #{count} commits ..." git.walk pp git.list report git.list.values.map(&:to_i)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
git_commit_size_scraper-1.0.2 | bin/git_commit_size_scraper |
git_commit_size_scraper-1.0.1 | bin/git_commit_size_scraper |
git_commit_size_scraper-1.0.0 | bin/git_commit_size_scraper |