Sha256: c958ce684fd1bb0e2665fd13d065a501ae0e36c629d9fcdaa9a687db04bbbfb1
Contents?: true
Size: 794 Bytes
Versions: 10
Compression:
Stored size: 794 Bytes
Contents
# frozen_string_literal: true require 'descriptive_statistics/safe' require_relative 'base' collection = [] 1_000_000.times { collection << rand(1..99) } puts '~~~ Baseline Summary Calculations ~~~' puts Benchmark.ips do |x| x.report('LS.13') do data = Lite::Statistics::Descriptive.new(collection) ls_baseline_summary(data) end x.report('DS.13') do data = DescriptiveStatistics::Stats.new(collection) data.descriptive_statistics end x.compare! end puts '~~~ Full Summary Calculations ~~~' puts Benchmark.ips do |x| x.report('LS.22') do data = Lite::Statistics::Descriptive.new(collection) data.sample_summary end x.report('DS.13') do data = DescriptiveStatistics::Stats.new(collection) data.descriptive_statistics end x.compare! end
Version data entries
10 entries across 10 versions & 1 rubygems