hitimes 1.2.2-x86-mingw32 → 1.2.3-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bd58d580c8c002422587b90de8680a913a34d265
4
+ data.tar.gz: 5433b4b435f4f1377744dc0cf6f43936617c7236
5
+ SHA512:
6
+ metadata.gz: 6c70e812fd98d77112c89e53c88f1df435a47b8486387792b62dc41e9f4ff4cc6c7bf0cb2d716d19745931e16a815853c31ab2c92c6f1b20d8986a7e91c486cf
7
+ data.tar.gz: d3bdce59d0b4d1d5fdf58ff18203fe42a6b4aeaef741df66532c666354be685d67d456a7564272bbed27d359ab71f0e667fe4f919cef1c9de36d9582bf123855
data/HISTORY.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Hitimes Changelog
2
2
 
3
+ ## Version 1.2.3 2015-09-13
4
+
5
+ * Release new fatbinary version for windows
6
+ * Update README to indicate duration units
7
+ * Provide a more friendly error message if the gem is not installed correctly
8
+
3
9
  ## Version 1.2.2 2014-07-09
4
10
 
5
11
  * fix compilation issue with clock_gettime in libc (reported by eradman and virtualfunction)
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  ISC LICENSE - http://opensource.org/licenses/isc-license.txt
2
2
 
3
- Copyright (c) 2008-2012 Jeremy Hinegardner
3
+ Copyright (c) 2008-2015 Jeremy Hinegardner
4
4
 
5
5
  Permission to use, copy, modify, and/or distribute this software for any
6
6
  purpose with or without fee is hereby granted, provided that the above
data/Manifest.txt CHANGED
@@ -1,4 +1,3 @@
1
- .travis.yml
2
1
  CONTRIBUTING.md
3
2
  HISTORY.md
4
3
  LICENSE
data/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  Hitimes is a fast, high resolution timer library for recording
15
15
  performance metrics. It uses the appropriate low method calls for each
16
- system to get the highest granularity time increments possible.
16
+ system to get the highest granularity time increments possible.
17
17
 
18
18
  It currently supports any of the following systems:
19
19
 
@@ -30,14 +30,17 @@ using `Process.times`.
30
30
 
31
31
  ### Interval
32
32
 
33
- Use Hitimes::Interval to calculate only the duration of a block of code
33
+ Use Hitimes::Interval to calculate only the duration of a block of code. Returns
34
+ the time as seconds.
34
35
 
35
36
  ``` ruby
36
37
  duration = Hitimes::Interval.measure do
37
- # some operation ...
38
+ 1_000_000.times do |x|
39
+ 2 + 2
40
+ end
38
41
  end
39
42
 
40
- puts duration
43
+ puts duration # => 0.047414297 (seconds)
41
44
  ```
42
45
 
43
46
  ### TimedMetric
@@ -126,21 +129,14 @@ Read the HISTORY.md file.
126
129
 
127
130
  ## BUILDING FOR WINDOWS
128
131
 
129
- [rake-compiler](https://github.com/luislavena/rake-compiler) is use for building
130
- the windows version. For me, on OSX to cross compile the process is:
132
+ This is done using https://github.com/rake-compiler/rake-compiler-dock
131
133
 
132
- ```
133
- % gem install rake-compiler # in each rvm instance, 1.8.7, 1.9.3
134
- % rvm use 2.0.0@hitimes
135
- % rake-compiler cross-ruby VERSION=2.0.0-p0 # or latest
136
- % rvm use 1.9.3@hitimes
137
- % rake-compiler cross-ruby VERSION=1.9.3-p374 # or latest
138
- % rvm use 1.8.7@hitimes
139
- % rake-compiler cross-ruby VERSION=1.8.7-p371
140
-
141
- # This only works via 1.8.7 at the current moment
142
- % rake cross native gem RUBY_CC_VERSION=1.8.7:1.9.3:2.0.0
143
- ```
134
+ 1. have VirtualBox installed
135
+ 2. Install boot2docker `brew install boot2docker`
136
+ 3. `gem install rake-compiler-dock`
137
+ 4. `rake-compiler-dock`
138
+ 5. `bundle`
139
+ 6 `rake cross native gem`
144
140
 
145
141
  ## CREDITS
146
142
 
@@ -148,7 +144,7 @@ the windows version. For me, on OSX to cross compile the process is:
148
144
 
149
145
  ## ISC License
150
146
 
151
- Copyright (c) 2008-2012 Jeremy Hinegardner
147
+ Copyright (c) 2008-2015 Jeremy Hinegardner
152
148
 
153
149
  Permission to use, copy, modify, and/or distribute this software for any
154
150
  purpose with or without fee is hereby granted, provided that the above
@@ -4,7 +4,7 @@ require 'mkmf'
4
4
  if RbConfig::CONFIG['host_os'] =~ /darwin/ then
5
5
  $CFLAGS += " -DUSE_INSTANT_OSX=1 -Wall"
6
6
  $LDFLAGS += " -framework CoreServices"
7
- elsif RbConfig::CONFIG['host_os'] =~ /win32/ or RbConfig::CONFIG['host_os'] =~ /mingw/ then
7
+ elsif RbConfig::CONFIG['host_os'] =~ /win(32|64)/ or RbConfig::CONFIG['host_os'] =~ /mingw/ then
8
8
  $CFLAGS += " -DUSE_INSTANT_WINDOWS=1"
9
9
  else
10
10
  if have_library("rt", "clock_gettime") then
data/lib/hitimes.rb CHANGED
@@ -29,13 +29,21 @@ require 'hitimes/version'
29
29
  # Load the binary extension, try loading one for the specific version of ruby
30
30
  # and if that fails, then fall back to one in the top of the library.
31
31
  # this is the method recommended by rake-compiler
32
- begin
33
- # this will be for windows
34
- require "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}/hitimes"
35
- rescue LoadError
36
- # everyone else.
37
- require 'hitimes/hitimes'
32
+
33
+ attempts = [
34
+ "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}/hitimes",
35
+ "hitimes/hitimes"
36
+ ]
37
+ loaded = false
38
+
39
+ attempts.each do |path|
40
+ begin
41
+ require path
42
+ loaded = true
43
+ rescue LoadError
44
+ end
38
45
  end
46
+ raise LoadError, "Unable to find binary extension, was hitimes installed correctly?" unless loaded
39
47
 
40
48
  require 'hitimes/stats'
41
49
  require 'hitimes/mutexed_stats'
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -4,5 +4,5 @@
4
4
  #++
5
5
 
6
6
  module Hitimes
7
- VERSION = "1.2.2"
7
+ VERSION = "1.2.3"
8
8
  end
metadata CHANGED
@@ -1,115 +1,102 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
5
- prerelease:
4
+ version: 1.2.3
6
5
  platform: x86-mingw32
7
6
  authors:
8
7
  - Jeremy Hinegardner
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-01-12 00:00:00.000000000 Z
11
+ date: 2015-09-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '10.4'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '10.4'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: minitest
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: '5.5'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: '5.5'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rdoc
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
47
  version: '4.2'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
54
  version: '4.2'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: json
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: '1.8'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '1.8'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake-compiler
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ~>
73
+ - - "~>"
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0.9'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ~>
80
+ - - "~>"
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0.9'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: simplecov
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ~>
87
+ - - "~>"
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0.9'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ~>
94
+ - - "~>"
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0.9'
110
- description: ! 'Hitimes is a fast, high resolution timer library for recording performance
97
+ description: 'Hitimes is a fast, high resolution timer library for recording performance
111
98
  metrics. It uses the appropriate low method calls for each system to get the highest
112
- granularity time increments possible. It currently supports any of the following
99
+ granularity time increments possible. It currently supports any of the following
113
100
  systems: * any system with the POSIX call `clock_gettime()` * Mac OS X * Windows
114
101
  * JRuby Using Hitimes can be faster than using a series of `Time.new` calls, and
115
102
  it will have a much higher granularity. It is definitely faster than using `Process.times`.'
@@ -122,7 +109,6 @@ extra_rdoc_files:
122
109
  - Manifest.txt
123
110
  - README.md
124
111
  files:
125
- - .travis.yml
126
112
  - CONTRIBUTING.md
127
113
  - HISTORY.md
128
114
  - LICENSE
@@ -145,6 +131,11 @@ files:
145
131
  - ext/hitimes/java/src/hitimes/HitimesService.java
146
132
  - ext/hitimes/java/src/hitimes/HitimesStats.java
147
133
  - lib/hitimes.rb
134
+ - lib/hitimes/1.8/hitimes.so
135
+ - lib/hitimes/1.9/hitimes.so
136
+ - lib/hitimes/2.0/hitimes.so
137
+ - lib/hitimes/2.1/hitimes.so
138
+ - lib/hitimes/2.2/hitimes.so
148
139
  - lib/hitimes/metric.rb
149
140
  - lib/hitimes/mutexed_stats.rb
150
141
  - lib/hitimes/paths.rb
@@ -167,37 +158,33 @@ files:
167
158
  - tasks/default.rake
168
159
  - tasks/extension.rake
169
160
  - tasks/this.rb
170
- - lib/hitimes/1.9/hitimes.so
171
- - lib/hitimes/2.0/hitimes.so
172
- - lib/hitimes/2.1/hitimes.so
173
161
  homepage: http://github.com/copiousfreetime/hitimes
174
162
  licenses:
175
163
  - ISC
164
+ metadata: {}
176
165
  post_install_message:
177
166
  rdoc_options:
178
- - --main
167
+ - "--main"
179
168
  - README.md
180
- - --markup
169
+ - "--markup"
181
170
  - tomdoc
182
171
  require_paths:
183
172
  - lib
184
173
  required_ruby_version: !ruby/object:Gem::Requirement
185
- none: false
186
174
  requirements:
187
- - - ! '>='
175
+ - - ">="
188
176
  - !ruby/object:Gem::Version
189
177
  version: 1.9.3
190
178
  required_rubygems_version: !ruby/object:Gem::Requirement
191
- none: false
192
179
  requirements:
193
- - - ! '>='
180
+ - - ">="
194
181
  - !ruby/object:Gem::Version
195
182
  version: '0'
196
183
  requirements: []
197
184
  rubyforge_project:
198
- rubygems_version: 1.8.23.2
185
+ rubygems_version: 2.4.8
199
186
  signing_key:
200
- specification_version: 3
187
+ specification_version: 4
201
188
  summary: Hitimes is a fast, high resolution timer library for recording performance
202
189
  metrics. It uses the appropriate low method calls for each system to get the highest
203
190
  granularity time increments possible.
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - "1.8.7"
4
- - "1.9.2"
5
- - "1.9.3"
6
- - "2.0.0"
7
- - "2.1.0"
8
- - jruby-18mode # JRuby in 1.8 mode
9
- - jruby-19mode # JRuby in 1.9 mode
10
- - rbx