hitimes 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -1,5 +1,10 @@
1
1
  = Changelog
2
- == Version 1.0.4 2009-08-1
2
+ == Version 1.0.5 2010-07-20
3
+
4
+ * Fix 'circular require considered harmful' warnings in 1.9.x (reported by Roger Pack)
5
+ * Fix 'method redefined' warnings in 1.9.x (reported by Roger Pack)
6
+
7
+ == Version 1.0.4 2009-08-01
3
8
 
4
9
  * Add in support for x86-mingw32 gem
5
10
  * Add version subdirectory for extension on all platforms
@@ -0,0 +1,179 @@
1
+
2
+ # This file was created by mkconfig.rb when ruby was built. Any
3
+ # changes made to this file will be lost the next time ruby is built.
4
+
5
+ module Config
6
+ RUBY_VERSION == "1.8.6" or
7
+ raise "ruby lib version (1.8.6) doesn't match executable version (#{RUBY_VERSION})"
8
+
9
+ TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.8/i386-mingw32")
10
+ DESTDIR = '' unless defined? DESTDIR
11
+ CONFIG = {}
12
+ CONFIG["DESTDIR"] = DESTDIR
13
+ CONFIG["INSTALL"] = '/usr/bin/install -c'
14
+ CONFIG["prefix"] = (TOPDIR || DESTDIR + "/Users/jeremy/.rake-compiler/ruby/ruby-1.8.6-p287")
15
+ CONFIG["EXEEXT"] = ".exe"
16
+ CONFIG["ruby_install_name"] = "ruby"
17
+ CONFIG["RUBY_INSTALL_NAME"] = "ruby"
18
+ CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby18"
19
+ CONFIG["SHELL"] = "/bin/sh"
20
+ CONFIG["PATH_SEPARATOR"] = ":"
21
+ CONFIG["PACKAGE_NAME"] = ""
22
+ CONFIG["PACKAGE_TARNAME"] = ""
23
+ CONFIG["PACKAGE_VERSION"] = ""
24
+ CONFIG["PACKAGE_STRING"] = ""
25
+ CONFIG["PACKAGE_BUGREPORT"] = ""
26
+ CONFIG["exec_prefix"] = "$(prefix)"
27
+ CONFIG["bindir"] = "$(exec_prefix)/bin"
28
+ CONFIG["sbindir"] = "$(exec_prefix)/sbin"
29
+ CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
30
+ CONFIG["datarootdir"] = "$(prefix)/share"
31
+ CONFIG["datadir"] = "$(datarootdir)"
32
+ CONFIG["sysconfdir"] = "$(prefix)/etc"
33
+ CONFIG["sharedstatedir"] = "$(prefix)/com"
34
+ CONFIG["localstatedir"] = "$(prefix)/var"
35
+ CONFIG["includedir"] = "$(prefix)/include"
36
+ CONFIG["oldincludedir"] = "/usr/include"
37
+ CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
38
+ CONFIG["infodir"] = "$(datarootdir)/info"
39
+ CONFIG["htmldir"] = "$(docdir)"
40
+ CONFIG["dvidir"] = "$(docdir)"
41
+ CONFIG["pdfdir"] = "$(docdir)"
42
+ CONFIG["psdir"] = "$(docdir)"
43
+ CONFIG["libdir"] = "$(exec_prefix)/lib"
44
+ CONFIG["localedir"] = "$(datarootdir)/locale"
45
+ CONFIG["mandir"] = "$(datarootdir)/man"
46
+ CONFIG["DEFS"] = ""
47
+ CONFIG["ECHO_C"] = ""
48
+ CONFIG["ECHO_N"] = "-n"
49
+ CONFIG["ECHO_T"] = ""
50
+ CONFIG["LIBS"] = "-lshell32 -lwsock32 "
51
+ CONFIG["build_alias"] = "i686-linux"
52
+ CONFIG["host_alias"] = "i386-mingw32"
53
+ CONFIG["target_alias"] = "i386-mingw32"
54
+ CONFIG["MAJOR"] = "1"
55
+ CONFIG["MINOR"] = "8"
56
+ CONFIG["TEENY"] = "6"
57
+ CONFIG["build"] = "i686-pc-linux"
58
+ CONFIG["build_cpu"] = "i686"
59
+ CONFIG["build_vendor"] = "pc"
60
+ CONFIG["build_os"] = "linux"
61
+ CONFIG["host"] = "i386-pc-mingw32"
62
+ CONFIG["host_cpu"] = "i386"
63
+ CONFIG["host_vendor"] = "pc"
64
+ CONFIG["host_os"] = "mingw32"
65
+ CONFIG["target"] = "i386-pc-mingw32"
66
+ CONFIG["target_cpu"] = "i386"
67
+ CONFIG["target_vendor"] = "pc"
68
+ CONFIG["target_os"] = "mingw32"
69
+ CONFIG["CC"] = "i386-mingw32-gcc"
70
+ CONFIG["CFLAGS"] = "-g -O2 "
71
+ CONFIG["LDFLAGS"] = "-L. "
72
+ CONFIG["CPPFLAGS"] = " $(DEFS)"
73
+ CONFIG["OBJEXT"] = "o"
74
+ CONFIG["CPP"] = "i386-mingw32-gcc -E"
75
+ CONFIG["GREP"] = "/usr/bin/grep"
76
+ CONFIG["EGREP"] = "/usr/bin/grep -E"
77
+ CONFIG["GNU_LD"] = "yes"
78
+ CONFIG["CPPOUTFILE"] = "-o conftest.i"
79
+ CONFIG["OUTFLAG"] = "-o "
80
+ CONFIG["YACC"] = "bison -y"
81
+ CONFIG["YFLAGS"] = ""
82
+ CONFIG["RANLIB"] = "i386-mingw32-ranlib"
83
+ CONFIG["AR"] = "i386-mingw32-ar"
84
+ CONFIG["AS"] = "i386-mingw32-as"
85
+ CONFIG["ASFLAGS"] = ""
86
+ CONFIG["NM"] = "i386-mingw32-nm"
87
+ CONFIG["WINDRES"] = "i386-mingw32-windres"
88
+ CONFIG["DLLWRAP"] = "i386-mingw32-dllwrap"
89
+ CONFIG["OBJDUMP"] = "i386-mingw32-objdump"
90
+ CONFIG["LN_S"] = "ln -s"
91
+ CONFIG["SET_MAKE"] = ""
92
+ CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
93
+ CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
94
+ CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
95
+ CONFIG["RM"] = "rm -f"
96
+ CONFIG["CP"] = "cp"
97
+ CONFIG["MAKEDIRS"] = "mkdir -p"
98
+ CONFIG["ALLOCA"] = ""
99
+ CONFIG["DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all"
100
+ CONFIG["ARCH_FLAG"] = ""
101
+ CONFIG["STATIC"] = ""
102
+ CONFIG["CCDLFLAGS"] = ""
103
+ CONFIG["LDSHARED"] = "i386-mingw32-gcc -shared -s"
104
+ CONFIG["DLEXT"] = "so"
105
+ CONFIG["DLEXT2"] = "dll"
106
+ CONFIG["LIBEXT"] = "a"
107
+ CONFIG["LINK_SO"] = ""
108
+ CONFIG["LIBPATHFLAG"] = " -L%s"
109
+ CONFIG["RPATHFLAG"] = ""
110
+ CONFIG["LIBPATHENV"] = ""
111
+ CONFIG["TRY_LINK"] = ""
112
+ CONFIG["STRIP"] = "strip"
113
+ CONFIG["EXTSTATIC"] = ""
114
+ CONFIG["setup"] = "Setup"
115
+ CONFIG["MINIRUBY"] = "ruby -I/Users/jeremy/.rake-compiler/builds/ruby-1.8.6-p287 -rfake"
116
+ CONFIG["PREP"] = "fake.rb"
117
+ CONFIG["RUNRUBY"] = "$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`"
118
+ CONFIG["EXTOUT"] = ".ext"
119
+ CONFIG["ARCHFILE"] = ""
120
+ CONFIG["RDOCTARGET"] = ""
121
+ CONFIG["XCFLAGS"] = " -DRUBY_EXPORT"
122
+ CONFIG["XLDFLAGS"] = " -Wl,--stack,0x02000000"
123
+ CONFIG["LIBRUBY_LDSHARED"] = "i386-mingw32-gcc -shared -s"
124
+ CONFIG["LIBRUBY_DLDFLAGS"] = " -Wl,--enable-auto-image-base,--enable-auto-import,--export-all -Wl,--out-implib=$(LIBRUBY)"
125
+ CONFIG["rubyw_install_name"] = "rubyw"
126
+ CONFIG["RUBYW_INSTALL_NAME"] = "rubyw"
127
+ CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
128
+ CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
129
+ CONFIG["LIBRUBY_ALIASES"] = ""
130
+ CONFIG["LIBRUBY"] = "lib$(LIBRUBY_SO).a"
131
+ CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
132
+ CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
133
+ CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
134
+ CONFIG["SOLIBS"] = "$(LIBS)"
135
+ CONFIG["DLDLIBS"] = ""
136
+ CONFIG["ENABLE_SHARED"] = "yes"
137
+ CONFIG["MAINLIBS"] = ""
138
+ CONFIG["COMMON_LIBS"] = "m"
139
+ CONFIG["COMMON_MACROS"] = ""
140
+ CONFIG["COMMON_HEADERS"] = "windows.h winsock.h"
141
+ CONFIG["EXPORT_PREFIX"] = ""
142
+ CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
143
+ CONFIG["arch"] = "i386-mingw32"
144
+ CONFIG["sitearch"] = "i386-msvcrt"
145
+ CONFIG["sitedir"] = "$(prefix)/lib/ruby/site_ruby"
146
+ CONFIG["configure_args"] = " '--target=i386-mingw32' '--host=i386-mingw32' '--build=i686-linux' '--enable-shared' '--disable-install-doc' '--without-tk' '--without-tcl' '--prefix=/Users/jeremy/.rake-compiler/ruby/ruby-1.8.6-p287' 'build_alias=i686-linux' 'host_alias=i386-mingw32' 'target_alias=i386-mingw32'"
147
+ CONFIG["NROFF"] = "/usr/bin/nroff"
148
+ CONFIG["MANTYPE"] = "doc"
149
+ CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
150
+ CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
151
+ CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
152
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
153
+ CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
154
+ CONFIG["topdir"] = File.dirname(__FILE__)
155
+ MAKEFILE_CONFIG = {}
156
+ CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
157
+ def Config::expand(val, config = CONFIG)
158
+ val.gsub!(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) do |var|
159
+ if !(v = $1 || $2)
160
+ '$'
161
+ elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
162
+ pat, sub = $1, $2
163
+ config[v] = false
164
+ Config::expand(key, config)
165
+ config[v] = key
166
+ key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
167
+ key
168
+ else
169
+ var
170
+ end
171
+ end
172
+ val
173
+ end
174
+ CONFIG.each_value do |val|
175
+ Config::expand(val)
176
+ end
177
+ end
178
+ RbConfig = Config # compatibility for ruby-1.9
179
+ CROSS_COMPILING = nil unless defined? CROSS_COMPILING
@@ -24,6 +24,7 @@ require 'hitimes/version'
24
24
  require "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}/hitimes_ext"
25
25
  require 'hitimes/stats'
26
26
  require 'hitimes/mutexed_stats'
27
+
27
28
  require 'hitimes/metric'
28
29
  require 'hitimes/value_metric'
29
30
  require 'hitimes/timed_metric'
@@ -1,3 +1,9 @@
1
+
2
+ #--
3
+ # Copyright (c) 2008, 2009 Jeremy Hinegardner
4
+ # All rights reserved. See LICENSE and/or COPYING for details.
5
+ #++
6
+
1
7
  module Hitimes
2
8
  #
3
9
  # Metric hold the common meta information for all derived metric classes
@@ -1,4 +1,8 @@
1
- require 'hitimes'
1
+ #--
2
+ # Copyright (c) 2008, 2009 Jeremy Hinegardner
3
+ # All rights reserved. See LICENSE and/or COPYING for details.
4
+ #++
5
+
2
6
  require 'thread'
3
7
 
4
8
  module Hitimes
@@ -1,4 +1,8 @@
1
- require 'hitimes'
1
+ #--
2
+ # Copyright (c) 2008, 2009 Jeremy Hinegardner
3
+ # All rights reserved. See LICENSE and/or COPYING for details.
4
+ #++
5
+
2
6
  require 'stringio'
3
7
  module Hitimes
4
8
  class Stats
@@ -3,7 +3,6 @@
3
3
  # All rights reserved. See LICENSE and/or COPYING for details.
4
4
  #++
5
5
 
6
- require 'hitimes'
7
6
  require 'forwardable'
8
7
  module Hitimes
9
8
  #
@@ -171,7 +170,7 @@ module Hitimes
171
170
 
172
171
  # forward appropriate calls directly to the stats object
173
172
  extend Forwardable
174
- def_delegators :@stats, :count, :sum, :max, :mean, :min, :rate, :stddev, :sum, :sumsq
173
+ def_delegators :@stats, :count, :max, :mean, :min, :rate, :stddev, :sum, :sumsq
175
174
  alias :duration :sum
176
175
  end
177
176
  end
@@ -3,8 +3,6 @@
3
3
  # All rights reserved. See LICENSE and/or COPYING for details.
4
4
  #++
5
5
 
6
- require 'hitimes'
7
-
8
6
  module Hitimes
9
7
  #
10
8
  # A TimedValueMetric holds the metrics on how long it takes to do a batch of something.
@@ -4,7 +4,6 @@
4
4
  #++
5
5
 
6
6
  require 'forwardable'
7
- require 'hitimes'
8
7
  module Hitimes
9
8
  #
10
9
  # A ValueMetric holds the data from measuring a single value over a period of
@@ -67,6 +66,6 @@ module Hitimes
67
66
 
68
67
  # forward appropriate calls directly to the stats object
69
68
  extend Forwardable
70
- def_delegators :@stats, :count, :sum, :max, :mean, :min, :stddev, :sum, :sumsq
71
- end
69
+ def_delegators :@stats, :count, :max, :mean, :min, :stddev, :sum, :sumsq
70
+ end
72
71
  end
@@ -16,7 +16,7 @@ module Hitimes
16
16
  MINOR = 0
17
17
 
18
18
  # Build number
19
- BUILD = 4
19
+ BUILD = 5
20
20
 
21
21
  #
22
22
  # :call-seq:
@@ -30,21 +30,20 @@ if ext_config = Configuration.for_if_exist?('extension') then
30
30
  ext_config = Configuration.for("extension")
31
31
  rbconfig = ext_config.cross_rbconfig["rbconfig-#{version}"]
32
32
  raise ArgumentError, "No cross compiler for version #{version}, we have #{ext_config.cross_rbconfig.keys.join(",")}" unless rbconfig
33
- ruby_exe = if version =~ /1\.8/ then
34
- "ruby"
35
- else
36
- "ruby1.9"
37
- end
38
33
  Hitimes::GEM_SPEC.extensions.each do |extension|
39
34
  path = Pathname.new(extension)
40
35
  parts = path.split
41
36
  conf = parts.last
37
+ rvm = %x[ which rvm ].strip
42
38
  Dir.chdir(path.dirname) do |d|
43
39
  if File.exist?( "Makefile" ) then
44
40
  sh "make clean distclean"
45
41
  end
46
42
  cp "#{rbconfig}", "rbconfig.rb"
47
- sh "#{ruby_exe} -I. extconf.rb"
43
+ rubylib = ENV['RUBYLIB']
44
+ ENV['RUBYLIB'] = "."
45
+ sh %[#{rvm} #{version} -S extconf.rb]
46
+ ENV['RUBYLIB'] = rubylib
48
47
  sh "make"
49
48
  end
50
49
  end
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 5
10
+ version: 1.0.5
5
11
  platform: ruby
6
12
  authors:
7
13
  - Jeremy Hinegardner
@@ -9,50 +15,87 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-08-01 00:00:00 -06:00
18
+ date: 2010-07-20 00:00:00 -06:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: rake
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ~>
22
28
  - !ruby/object:Gem::Version
29
+ hash: 61
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 1
23
34
  version: 0.8.1
24
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
38
  name: configuration
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
30
42
  requirements:
31
43
  - - ~>
32
44
  - !ruby/object:Gem::Version
45
+ hash: 21
46
+ segments:
47
+ - 0
48
+ - 0
49
+ - 5
33
50
  version: 0.0.5
34
- version:
51
+ type: :runtime
52
+ version_requirements: *id002
35
53
  - !ruby/object:Gem::Dependency
36
54
  name: json
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
40
58
  requirements:
41
59
  - - ~>
42
60
  - !ruby/object:Gem::Version
61
+ hash: 21
62
+ segments:
63
+ - 1
64
+ - 1
65
+ - 3
43
66
  version: 1.1.3
44
- version:
67
+ type: :development
68
+ version_requirements: *id003
45
69
  - !ruby/object:Gem::Dependency
46
70
  name: rake-compiler
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
50
74
  requirements:
51
75
  - - ~>
52
76
  - !ruby/object:Gem::Version
77
+ hash: 11
78
+ segments:
79
+ - 0
80
+ - 5
81
+ - 0
53
82
  version: 0.5.0
54
- version:
55
- description: "Hitimes is a fast, high resolution timer library for recording performance metrics. It uses the appropriate C method calls for each system to get the highest granularity time increments possible. It currently supports any of the following systems: * any system with the POSIX call <tt>clock_gettime()</tt>, * Mac OS X * Windows Using Hitimes can be faster than using a series of +Time.new+ calls, and it will have a much higher granularity. It is definitely faster than using +Process.times+."
83
+ type: :development
84
+ version_requirements: *id004
85
+ description: |-
86
+ Hitimes is a fast, high resolution timer library for recording
87
+ performance metrics. It uses the appropriate C method calls for each
88
+ system to get the highest granularity time increments possible.
89
+
90
+ It currently supports any of the following systems:
91
+
92
+ * any system with the POSIX call <tt>clock_gettime()</tt>,
93
+ * Mac OS X
94
+ * Windows
95
+
96
+ Using Hitimes can be faster than using a series of +Time.new+ calls, and
97
+ it will have a much higher granularity. It is definitely faster than
98
+ using +Process.times+.
56
99
  email: jeremy@copiousfreetime.org
57
100
  executables: []
58
101
 
@@ -83,6 +126,7 @@ files:
83
126
  - ext/hitimes/hitimes_interval.h
84
127
  - ext/hitimes/hitimes_stats.h
85
128
  - ext/hitimes/extconf.rb
129
+ - ext/hitimes/rbconfig.rb
86
130
  - lib/hitimes/metric.rb
87
131
  - lib/hitimes/mutexed_stats.rb
88
132
  - lib/hitimes/paths.rb
@@ -117,6 +161,8 @@ files:
117
161
  - gemspec.rb
118
162
  has_rdoc: true
119
163
  homepage: http://copiousfreetime.rubyforge.org/hitimes/
164
+ licenses: []
165
+
120
166
  post_install_message:
121
167
  rdoc_options:
122
168
  - --line-numbers
@@ -126,23 +172,29 @@ require_paths:
126
172
  - lib
127
173
  - ext
128
174
  required_ruby_version: !ruby/object:Gem::Requirement
175
+ none: false
129
176
  requirements:
130
177
  - - ">="
131
178
  - !ruby/object:Gem::Version
179
+ hash: 3
180
+ segments:
181
+ - 0
132
182
  version: "0"
133
- version:
134
183
  required_rubygems_version: !ruby/object:Gem::Requirement
184
+ none: false
135
185
  requirements:
136
186
  - - ">="
137
187
  - !ruby/object:Gem::Version
188
+ hash: 3
189
+ segments:
190
+ - 0
138
191
  version: "0"
139
- version:
140
192
  requirements: []
141
193
 
142
194
  rubyforge_project: copiousfreetime
143
- rubygems_version: 1.3.1
195
+ rubygems_version: 1.3.7
144
196
  signing_key:
145
- specification_version: 2
197
+ specification_version: 3
146
198
  summary: Hitimes is a fast, high resolution timer library for recording performance metrics
147
199
  test_files: []
148
200