Skip to content

Commit

Permalink
Release 0.8.7 (improved startup time)
Browse files Browse the repository at this point in the history
CHANGE: Improved startup time (via autoload)
  • Loading branch information
delano committed Oct 7, 2009
1 parent 0dd4340 commit 8ae5f9b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
3 changes: 2 additions & 1 deletion CHANGES.txt
Expand Up @@ -11,13 +11,14 @@ TRYOUTS, CHANGES
* TODO: Clear stash between drills


#### 0.8.5 (2009-09-??) ###############################
#### 0.8.5 (2009-10-07) ###############################

NOTE: Benchmark tryouts must now use proc style dreams

* CHANGE: Benchmark tryouts now display complex benchmark info
(utime, stime, cutime, cstime, total, real)
* CHANGE: Benchmark tryouts now run a brief warmup
* CHANGE: Improved startup time (via autoload)


#### 0.8.4 (2009-07-20) ###############################
Expand Down
33 changes: 22 additions & 11 deletions lib/tryouts.rb
@@ -1,10 +1,11 @@

require 'time'
require 'attic'
require 'sysinfo'
require 'digest/sha1'
require 'ostruct'
require 'yaml'

autoload :Attic, 'attic'
autoload :SysInfo, 'sysinfo'
autoload :OpenStruct, 'ostruct'
autoload :YAML, 'yaml'

## NOTE: Don't require rye here so
## we can still run tryouts on the
Expand Down Expand Up @@ -46,22 +47,29 @@ def message
end
end

VERSION = "0.8.4"
VERSION = "0.8.5"

require 'tryouts/mixins'
require 'tryouts/tryout'
require 'tryouts/drill'
require 'tryouts/stats'

require 'tryouts/orderedhash'
HASH_TYPE = (RUBY_VERSION =~ /1.9/) ? ::Hash : Tryouts::OrderedHash

autoload :Stats, 'tryouts/stats'

unless defined?(HASH_TYPE)
if RUBY_VERSION =~ /1.8/
require 'tryouts/orderedhash'
HASH_TYPE = Tryouts::OrderedHash
else
HASH_TYPE = Hash
end
end

# An Array of +_tryouts.rb+ file paths that have been loaded.
@@loaded_files = []
# An Hash of Tryouts instances stored under the name of the Tryouts subclass.
@@instances = HASH_TYPE.new
# An instance of SysInfo
@@sysinfo = SysInfo.new
@@sysinfo = nil

@@debug = false
@@verbose = 0
Expand All @@ -81,7 +89,10 @@ def self.failed=(v); @@failed = v; end
# Returns +@@instances+
def self.instances; @@instances; end
# Returns +@@sysinfo+
def self.sysinfo; @@sysinfo; end
def self.sysinfo
@@sysinfo = SysInfo.new if @@sysinfo.nil?
@@sysinfo
end

# The name of this group of Tryout objects
attr_accessor :group
Expand Down
2 changes: 1 addition & 1 deletion lib/tryouts/drill.rb
Expand Up @@ -15,7 +15,7 @@ class Drill
require 'tryouts/drill/sergeant/cli'
require 'tryouts/drill/sergeant/api'
require 'tryouts/drill/sergeant/benchmark'
require 'tryouts/drill/sergeant/rbenchmark'
#require 'tryouts/drill/sergeant/rbenchmark'

class NoSergeant < Tryouts::Exception; end
class UnknownFormat < Tryouts::Exception; end
Expand Down
3 changes: 1 addition & 2 deletions lib/tryouts/drill/sergeant/cli.rb
@@ -1,4 +1,4 @@

autoload :Rye, 'rye' # Make sure rye is loaded

class Tryouts; class Drill; module Sergeant

Expand All @@ -17,7 +17,6 @@ class CLI
attr_accessor :command

def initialize(*args)
require 'rye' # Make sure rye is loaded
@command = args.shift
@rbox_args = args
@rbox = Rye::Box.new
Expand Down
2 changes: 1 addition & 1 deletion tryouts.gemspec
@@ -1,7 +1,7 @@
@spec = Gem::Specification.new do |s|
s.name = "tryouts"
s.rubyforge_project = "tryouts"
s.version = "0.8.5.001"
s.version = "0.8.5"
s.summary = "Tryouts is a high-level testing library (DSL) for your Ruby codes and command-line applications."
s.description = s.summary
s.author = "Delano Mandelbaum"
Expand Down

0 comments on commit 8ae5f9b

Please sign in to comment.