hitimes 1.2.3-x86-mingw32 → 1.2.4-x86-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd58d580c8c002422587b90de8680a913a34d265
4
- data.tar.gz: 5433b4b435f4f1377744dc0cf6f43936617c7236
3
+ metadata.gz: 76123055c972e4bdc65f940a9a3e9b4d4ad39e74
4
+ data.tar.gz: 065e55135f066741031fd82e4bd7abd590772966
5
5
  SHA512:
6
- metadata.gz: 6c70e812fd98d77112c89e53c88f1df435a47b8486387792b62dc41e9f4ff4cc6c7bf0cb2d716d19745931e16a815853c31ab2c92c6f1b20d8986a7e91c486cf
7
- data.tar.gz: d3bdce59d0b4d1d5fdf58ff18203fe42a6b4aeaef741df66532c666354be685d67d456a7564272bbed27d359ab71f0e667fe4f919cef1c9de36d9582bf123855
6
+ metadata.gz: 4904fb2ea92ba508f6e03bc168a544de738bcdbd8069728f6f4d3494b10b2efba1986d25bc9f2dfdfa80f8ba2ce9dbe4a44ce593719f8676e7339b41451ae4b4
7
+ data.tar.gz: 137d89fb321082396a4786e9692c80b4e3fb2d865b7cd4d80880a67fda53ca3da3cfacda12a4f1a8d5725abe99dbaf8c9d740dce677a1b6b9b27c6d828c233b3
@@ -27,15 +27,27 @@ easiest way to contribute.
27
27
  * Fork the [repo][].
28
28
  * Create a new branch for your issue: `git checkout -b issue/my-issue`
29
29
  * Lovingly craft your contribution:
30
- * `rake develop` to get started, or if you prefer bundler `rake develop:using_bunder && bundle`.
30
+ * `rake develop` to get started
31
31
  * `rake test` to run tests
32
32
  * Make sure that `rake test` passes. Its important, I said it twice.
33
33
  * Add yourself to the contributors section below.
34
34
  * Submit your [pull request][].
35
35
 
36
+ ## Building Windows Binaries
37
+
38
+ This is done using https://github.com/rake-compiler/rake-compiler-dock
39
+
40
+ 1. have VirtualBox installed
41
+ 2. have Docker Machine installed (https://docs.docker.com/engine/installation/)
42
+ 3. `gem install rake-compiler-dock`
43
+ 4. `rake-compiler-dock` (this could take a while)
44
+ 5. `bundle`
45
+ 6. `rake cross native gem`
46
+
36
47
  # Contributors
37
48
 
38
49
  * Jeremy Hinegardner
50
+ * Wojciech Piekutowski
39
51
 
40
52
  [GitHub Account]: https://github.com/signup/free "GitHub Signup"
41
53
  [GitHub Issues]: https://github.com/copiousfreetime/hitimes/issues "Hitimes Issues"
data/HISTORY.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Hitimes Changelog
2
2
 
3
+ ## Version 1.2.4 2016-05-01
4
+
5
+ * Fix finding the extension on ruby 2.1.10 (thanks @wpiekutowski)
6
+ * Add more readable load error (thanks @mbautin)
7
+ * Update README with what versions of ruby are supported.
8
+
3
9
  ## Version 1.2.3 2015-09-13
4
10
 
5
11
  * Release new fatbinary version for windows
data/README.md CHANGED
@@ -1,39 +1,52 @@
1
- ## hitimes
1
+ # Hitimes
2
+
3
+ A fast, high resolution timer library for recording peformance metrics.
2
4
 
3
5
  * [Homepage](http://github.com/copiousfreetime/hitimes)
4
6
  * [Github project](http://github.com.org/copiousfreetime/hitimes)
5
7
  * email jeremy at copiousfreetime dot org
6
8
  * `git clone url git://github.com/copiousfreetime/hitimes.git`
7
9
 
8
- ## INSTALL
10
+ ## Table of Contents
9
11
 
10
- * `gem install hitimes`
12
+ * [Requirements](#requirements)
13
+ * [Usage](#usage)
14
+ * [Contributing](#contributing)
15
+ * [Support](#support)
16
+ * [License](#license)
11
17
 
12
- ## DESCRIPTION
18
+ ## Requirements
13
19
 
14
- Hitimes is a fast, high resolution timer library for recording
15
- performance metrics. It uses the appropriate low method calls for each
16
- system to get the highest granularity time increments possible.
20
+ Hitimes requires the following to run:
17
21
 
18
- It currently supports any of the following systems:
22
+ * Ruby
19
23
 
20
- * any system with the POSIX call `clock_gettime()`
21
- * Mac OS X
22
- * Windows
23
- * JRuby
24
+ ## Usage
25
+
26
+ Hitimes easiest to use when installed with `rubygems`:
27
+
28
+ ```sh
29
+ gem install hitimes
30
+ ```
31
+
32
+ Or as part of your bundler `Gemfile`:
33
+
34
+ ```ruby
35
+ gem 'hitimes'
36
+ ```
24
37
 
25
- Using Hitimes can be faster than using a series of `Time.new` calls, and
26
- it will have a much higher granularity. It is definitely faster than
27
- using `Process.times`.
38
+ You can load it with the standard ruby require statement.
28
39
 
29
- ## SYNOPSIS
40
+ ```ruby
41
+ require 'hitimes'
42
+ ```
30
43
 
31
44
  ### Interval
32
45
 
33
- Use Hitimes::Interval to calculate only the duration of a block of code. Returns
34
- the time as seconds.
46
+ Use `Hitimes::Interval` to calculate only the duration of a block of code.
47
+ Returns the time as seconds.
35
48
 
36
- ``` ruby
49
+ ```ruby
37
50
  duration = Hitimes::Interval.measure do
38
51
  1_000_000.times do |x|
39
52
  2 + 2
@@ -45,15 +58,15 @@ puts duration # => 0.047414297 (seconds)
45
58
 
46
59
  ### TimedMetric
47
60
 
48
- Use a Hitimes::TimedMetric to calculate statistics about an iterative operation
61
+ Use a `Hitimes::TimedMetric` to calculate statistics about an iterative operation
49
62
 
50
- ``` ruby
63
+ ```ruby
51
64
  timed_metric = Hitimes::TimedMetric.new('operation on items')
52
65
  ```
53
66
 
54
67
  Explicitly use `start` and `stop`:
55
68
 
56
- ``` ruby
69
+ ```ruby
57
70
  collection.each do |item|
58
71
  timed_metric.start
59
72
  # .. do something with item
@@ -61,26 +74,26 @@ collection.each do |item|
61
74
  end
62
75
  ```
63
76
 
64
- Or use the block. In TimedMetric the return value of +measure+ is the return
65
- value of the block
77
+ Or use the block. In `TimedMetric` the return value of `measure` is the return
78
+ value of the block.
66
79
 
67
- ``` ruby
80
+ ```ruby
68
81
  collection.each do |item|
69
82
  result_of_do_something = timed_metric.measure { do_something( item ) }
70
83
  end
71
84
  ```
72
85
  And then look at the stats
73
86
 
74
- ``` ruby
87
+ ```ruby
75
88
  puts timed_metric.mean
76
89
  puts timed_metric.max
77
90
  puts timed_metric.min
78
91
  puts timed_metric.stddev
79
92
  puts timed_metric.rate
80
93
  ```
81
- ### ValueMetric
94
+ ### ValueMetric
82
95
 
83
- Use a Hitimes::ValueMetric to calculate statistics about measured samples
96
+ Use a `Hitimes::ValueMetric` to calculate statistics about measured samples.
84
97
 
85
98
  ``` ruby
86
99
  value_metric = Hitimes::ValueMetric.new( 'size of thing' )
@@ -99,7 +112,7 @@ puts value_metric.rate
99
112
 
100
113
  ### TimedValueMetric
101
114
 
102
- Use a Hitimes::TimedValueMetric to calculate statistics about batches of samples
115
+ Use a `Hitimes::TimedValueMetric` to calculate statistics about batches of samples.
103
116
 
104
117
  ``` ruby
105
118
  timed_value_metric = Hitimes::TimedValueMetric.new( 'batch times' )
@@ -123,28 +136,51 @@ puts timed_value_metric.value_stats.min
123
136
  puts timed_value_metric.value_stats.stddev
124
137
  ```
125
138
 
126
- ## CHANGES
139
+ ### Implementation details
127
140
 
128
- Read the HISTORY.md file.
141
+ Hitimes use the appropriate low-level system call for each operating system to
142
+ get the highest granularity time increment possible. Generally this is
143
+ nanosecond resolution, or whatever the hardware chip in the CPU supports.
144
+
145
+ It currently supports any of the following systems:
129
146
 
130
- ## BUILDING FOR WINDOWS
147
+ * any system with the POSIX call `clock_gettime()`
148
+ * Mac OS X
149
+ * Windows
150
+ * JRuby
131
151
 
132
- This is done using https://github.com/rake-compiler/rake-compiler-dock
152
+ ## Support
133
153
 
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`
154
+ Hitimes is supported on whatever versions of ruby are currently supported.
155
+ Hitimes also follows [semantic versioning](http://semver.org/).
140
156
 
141
- ## CREDITS
157
+ The current officially supported versions of Ruby are:
158
+
159
+ * MRI Ruby 2.2, 2.3
160
+ * JRuby 1.7.25, 9.0.5.0
161
+
162
+ Unofficially supported versions, they have been supported in the past when they
163
+ were the primary rubies around. In all likelihood they still work, but are not
164
+ supported.
165
+
166
+ * MRI Ruby - everything from 1.8.7 to 2.1
167
+ * JRuby - I think everything back to 1.4
168
+ * Rubinius
169
+
170
+ ## Contributing
171
+
172
+ Please read the [CONTRIBUTING.md](CONTRIBUTING.md)
173
+
174
+ ## Credits
142
175
 
143
176
  * [Bruce Williams](https://github.com/bruce) for suggesting the idea
144
177
 
145
- ## ISC License
178
+ ## License
179
+
180
+ Hitimes is licensed under the [ISC](https://opensource.org/licenses/ISC)
181
+ license.
146
182
 
147
- Copyright (c) 2008-2015 Jeremy Hinegardner
183
+ Copyright (c) 2008-2016 Jeremy Hinegardner
148
184
 
149
185
  Permission to use, copy, modify, and/or distribute this software for any
150
186
  purpose with or without fee is hereby granted, provided that the above
data/Rakefile CHANGED
@@ -12,6 +12,7 @@ This.ruby_gemspec do |spec|
12
12
  spec.add_development_dependency( 'rdoc' , '~> 4.2' )
13
13
  spec.add_development_dependency( 'json' , '~> 1.8' )
14
14
  spec.add_development_dependency( 'rake-compiler', '~> 0.9' )
15
+ spec.add_development_dependency( 'rake-compiler-dock', '~> 0.4' )
15
16
  spec.add_development_dependency( 'simplecov' , '~> 0.9' )
16
17
 
17
18
  spec.extensions.concat This.extension_conf_files
@@ -20,5 +20,5 @@ _
20
20
  end
21
21
 
22
22
  # put in a different location if on windows so we can have fat binaries
23
- subdir = RUBY_VERSION.gsub(/\.\d$/,'')
23
+ subdir = RUBY_VERSION.gsub(/\.\d+$/,'')
24
24
  create_makefile("hitimes/#{subdir}/hitimes")
@@ -31,19 +31,30 @@ require 'hitimes/version'
31
31
  # this is the method recommended by rake-compiler
32
32
 
33
33
  attempts = [
34
- "hitimes/#{RUBY_VERSION.sub(/\.\d$/,'')}/hitimes",
34
+ "hitimes/#{RUBY_VERSION.sub(/\.\d+$/,'')}/hitimes",
35
35
  "hitimes/hitimes"
36
36
  ]
37
37
  loaded = false
38
38
 
39
+ path_exceptions = []
39
40
  attempts.each do |path|
40
41
  begin
41
42
  require path
42
43
  loaded = true
43
- rescue LoadError
44
+ break
45
+ rescue LoadError => load_error
46
+ full_path = File.expand_path(path)
47
+ path_exceptions << [ full_path, load_error.message ]
44
48
  end
45
49
  end
46
- raise LoadError, "Unable to find binary extension, was hitimes installed correctly?" unless loaded
50
+
51
+ if !loaded then
52
+ msg = ["Unable to find binary extension, was hitimes installed correctly? The following paths were tried."]
53
+ path_exceptions.each do |path, message|
54
+ msg << "#{path} : #{message}"
55
+ end
56
+ raise LoadError, msg.join("\n")
57
+ end
47
58
 
48
59
  require 'hitimes/stats'
49
60
  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.3"
7
+ VERSION = "1.2.4"
8
8
  end
@@ -29,7 +29,7 @@ namespace :develop do
29
29
  end
30
30
  end
31
31
  end
32
- desc "Boostrap development"
32
+ desc "Bootstrap development"
33
33
  task :develop => "develop:default"
34
34
 
35
35
  #------------------------------------------------------------------------------
@@ -180,7 +180,7 @@ class ThisProject
180
180
 
181
181
  # Internal: Return the DESCRIPTION section of the README.rdoc file
182
182
  def description_section
183
- section_of( 'README.md', 'DESCRIPTION')
183
+ section_of( 'README.md', 'Hitimes')
184
184
  end
185
185
 
186
186
  # Internal: Return the summary text from the README
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Jeremy Hinegardner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-13 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake-compiler-dock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0.4'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0.4'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -94,12 +108,9 @@ dependencies:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0.9'
97
- description: 'Hitimes is a fast, high resolution timer library for recording performance
98
- metrics. It uses the appropriate low method calls for each system to get the highest
99
- granularity time increments possible. It currently supports any of the following
100
- systems: * any system with the POSIX call `clock_gettime()` * Mac OS X * Windows
101
- * JRuby Using Hitimes can be faster than using a series of `Time.new` calls, and
102
- it will have a much higher granularity. It is definitely faster than using `Process.times`.'
111
+ description: A fast, high resolution timer library for recording peformance metrics.
112
+ * (http://github.com/copiousfreetime/hitimes) * (http://github.com.org/copiousfreetime/hitimes)
113
+ * email jeremy at copiousfreetime dot org * `git clone url git://github.com/copiousfreetime/hitimes.git`
103
114
  email: jeremy@copiousfreetime.org
104
115
  executables: []
105
116
  extensions: []
@@ -136,6 +147,7 @@ files:
136
147
  - lib/hitimes/2.0/hitimes.so
137
148
  - lib/hitimes/2.1/hitimes.so
138
149
  - lib/hitimes/2.2/hitimes.so
150
+ - lib/hitimes/2.3/hitimes.so
139
151
  - lib/hitimes/metric.rb
140
152
  - lib/hitimes/mutexed_stats.rb
141
153
  - lib/hitimes/paths.rb
@@ -182,12 +194,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
194
  version: '0'
183
195
  requirements: []
184
196
  rubyforge_project:
185
- rubygems_version: 2.4.8
197
+ rubygems_version: 2.5.1
186
198
  signing_key:
187
199
  specification_version: 4
188
- summary: Hitimes is a fast, high resolution timer library for recording performance
189
- metrics. It uses the appropriate low method calls for each system to get the highest
190
- granularity time increments possible.
200
+ summary: A fast, high resolution timer library for recording peformance metrics.
191
201
  test_files:
192
202
  - spec/hitimes_spec.rb
193
203
  - spec/interval_spec.rb