hitimes 1.1.1-java → 1.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/CONTRIBUTING.md +45 -0
  2. data/{HISTORY → HISTORY.rdoc} +14 -1
  3. data/LICENSE +11 -8
  4. data/Manifest.txt +44 -0
  5. data/{README → README.rdoc} +18 -5
  6. data/Rakefile +20 -62
  7. data/ext/hitimes/{extconf.rb → c/extconf.rb} +3 -3
  8. data/ext/hitimes/{hitimes_ext.c → c/hitimes.c} +1 -1
  9. data/ext/hitimes/{hitimes_instant_clock_gettime.c → c/hitimes_instant_clock_gettime.c} +0 -0
  10. data/ext/hitimes/c/hitimes_instant_osx.c +45 -0
  11. data/ext/hitimes/{hitimes_instant_windows.c → c/hitimes_instant_windows.c} +0 -0
  12. data/ext/hitimes/{hitimes_interval.c → c/hitimes_interval.c} +15 -7
  13. data/ext/hitimes/{hitimes_interval.h → c/hitimes_interval.h} +5 -5
  14. data/ext/hitimes/{hitimes_stats.c → c/hitimes_stats.c} +0 -0
  15. data/ext/hitimes/{hitimes_stats.h → c/hitimes_stats.h} +0 -0
  16. data/ext/{java → hitimes/java}/src/hitimes/Hitimes.java +1 -1
  17. data/ext/{java → hitimes/java}/src/hitimes/HitimesInterval.java +8 -1
  18. data/ext/{java → hitimes/java}/src/hitimes/HitimesService.java +0 -0
  19. data/ext/{java → hitimes/java}/src/hitimes/HitimesStats.java +0 -0
  20. data/lib/hitimes.rb +15 -5
  21. data/lib/hitimes/hitimes.jar +0 -0
  22. data/lib/hitimes/version.rb +1 -50
  23. data/spec/hitimes_spec.rb +14 -0
  24. data/spec/interval_spec.rb +24 -21
  25. data/spec/metric_spec.rb +8 -10
  26. data/spec/mutex_stats_spec.rb +8 -6
  27. data/spec/paths_spec.rb +1 -3
  28. data/spec/spec_helper.rb +7 -3
  29. data/spec/stats_spec.rb +26 -28
  30. data/spec/timed_metric_spec.rb +33 -33
  31. data/spec/timed_value_metric_spec.rb +45 -46
  32. data/spec/value_metric_spec.rb +21 -23
  33. data/spec/version_spec.rb +4 -30
  34. data/tasks/default.rake +267 -0
  35. data/tasks/extension.rake +31 -101
  36. data/tasks/this.rb +209 -0
  37. metadata +185 -182
  38. data/ext/hitimes/hitimes_instant_osx.c +0 -16
  39. data/gemspec.rb +0 -64
  40. data/tasks/announce.rake +0 -42
  41. data/tasks/config.rb +0 -109
  42. data/tasks/distribution.rake +0 -93
  43. data/tasks/documentation.rake +0 -32
  44. data/tasks/rspec.rake +0 -33
  45. data/tasks/rubyforge.rake +0 -55
  46. data/tasks/utils.rb +0 -80
metadata CHANGED
@@ -1,192 +1,195 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: hitimes
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 1
8
- - 1
9
- version: 1.1.1
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 1.2.0
10
6
  platform: java
11
- authors:
12
- - Jeremy Hinegardner
13
- autorequire:
7
+ authors:
8
+ - Jeremy Hinegardner
9
+ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2010-09-06 00:00:00 -06:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rake
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 8
30
- - 1
31
- version: 0.8.1
32
- type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: configuration
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ~>
40
- - !ruby/object:Gem::Version
41
- segments:
42
- - 0
43
- - 0
44
- - 5
45
- version: 0.0.5
46
- type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: json
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ~>
54
- - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 1
58
- - 3
59
- version: 1.1.3
60
- type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: rake-compiler
64
- prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- segments:
70
- - 0
71
- - 5
72
- - 0
73
- version: 0.5.0
74
- type: :development
75
- version_requirements: *id004
76
- description: |-
77
- Hitimes is a fast, high resolution timer library for recording
78
- performance metrics. It uses the appropriate low method calls for each
79
- system to get the highest granularity time increments possible.
80
-
81
- It currently supports any of the following systems:
82
-
83
- * any system with the POSIX call <tt>clock_gettime()</tt>,
84
- * Mac OS X
85
- * Windows
86
- * JRuby
87
-
88
- Using Hitimes can be faster than using a series of +Time.new+ calls, and
89
- it will have a much higher granularity. It is definitely faster than
90
- using +Process.times+.
12
+ date: 2013-02-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 10.0.3
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 10.0.3
27
+ none: false
28
+ prerelease: false
29
+ type: :development
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - "~>"
35
+ - !ruby/object:Gem::Version
36
+ version: 2.12.0
37
+ none: false
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: 2.12.0
43
+ none: false
44
+ prerelease: false
45
+ type: :development
46
+ - !ruby/object:Gem::Dependency
47
+ name: rdoc
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '3.12'
53
+ none: false
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '3.12'
59
+ none: false
60
+ prerelease: false
61
+ type: :development
62
+ - !ruby/object:Gem::Dependency
63
+ name: json
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.7.6
69
+ none: false
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 1.7.6
75
+ none: false
76
+ prerelease: false
77
+ type: :development
78
+ - !ruby/object:Gem::Dependency
79
+ name: rake-compiler
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: 0.8.1
85
+ none: false
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: 0.8.1
91
+ none: false
92
+ prerelease: false
93
+ type: :development
94
+ description: ! 'Hitimes is a fast, high resolution timer library for recording performance
95
+ metrics. It uses the appropriate low method calls for each system to get the highest
96
+ granularity time increments possible. It currently supports any of the following
97
+ systems: * any system with the POSIX call <tt>clock_gettime()</tt>, * Mac OS X *
98
+ Windows * JRuby Using Hitimes can be faster than using a series of +Time.new+ calls,
99
+ and it will have a much higher granularity. It is definitely faster than using
100
+ +Process.times+.'
91
101
  email: jeremy@copiousfreetime.org
92
102
  executables: []
93
-
94
103
  extensions: []
95
-
96
- extra_rdoc_files:
97
- - README
98
- - HISTORY
99
- - LICENSE
100
- - lib/hitimes.rb
101
- - lib/hitimes/metric.rb
102
- - lib/hitimes/mutexed_stats.rb
103
- - lib/hitimes/paths.rb
104
- - lib/hitimes/stats.rb
105
- - lib/hitimes/timed_metric.rb
106
- - lib/hitimes/timed_value_metric.rb
107
- - lib/hitimes/value_metric.rb
108
- - lib/hitimes/version.rb
109
- files:
110
- - examples/benchmarks.rb
111
- - examples/stats.rb
112
- - ext/hitimes/hitimes_ext.c
113
- - ext/hitimes/hitimes_instant_clock_gettime.c
114
- - ext/hitimes/hitimes_instant_osx.c
115
- - ext/hitimes/hitimes_instant_windows.c
116
- - ext/hitimes/hitimes_interval.c
117
- - ext/hitimes/hitimes_stats.c
118
- - ext/hitimes/hitimes_interval.h
119
- - ext/hitimes/hitimes_stats.h
120
- - ext/hitimes/extconf.rb
121
- - lib/hitimes.rb
122
- - lib/hitimes/metric.rb
123
- - lib/hitimes/mutexed_stats.rb
124
- - lib/hitimes/paths.rb
125
- - lib/hitimes/stats.rb
126
- - lib/hitimes/timed_metric.rb
127
- - lib/hitimes/timed_value_metric.rb
128
- - lib/hitimes/value_metric.rb
129
- - lib/hitimes/version.rb
130
- - spec/interval_spec.rb
131
- - spec/metric_spec.rb
132
- - spec/mutex_stats_spec.rb
133
- - spec/paths_spec.rb
134
- - spec/spec_helper.rb
135
- - spec/stats_spec.rb
136
- - spec/timed_metric_spec.rb
137
- - spec/timed_value_metric_spec.rb
138
- - spec/value_metric_spec.rb
139
- - spec/version_spec.rb
140
- - README
141
- - HISTORY
142
- - LICENSE
143
- - tasks/announce.rake
144
- - tasks/distribution.rake
145
- - tasks/documentation.rake
146
- - tasks/extension.rake
147
- - tasks/rspec.rake
148
- - tasks/rubyforge.rake
149
- - tasks/config.rb
150
- - tasks/utils.rb
151
- - Rakefile
152
- - gemspec.rb
153
- - lib/hitimes/hitimes.jar
154
- - ext/java/src/hitimes/Hitimes.java
155
- - ext/java/src/hitimes/HitimesInterval.java
156
- - ext/java/src/hitimes/HitimesService.java
157
- - ext/java/src/hitimes/HitimesStats.java
158
- has_rdoc: true
159
- homepage: http://copiousfreetime.rubyforge.org/hitimes/
104
+ extra_rdoc_files:
105
+ - HISTORY.rdoc
106
+ - Manifest.txt
107
+ - README.rdoc
108
+ files:
109
+ - CONTRIBUTING.md
110
+ - HISTORY.rdoc
111
+ - LICENSE
112
+ - Manifest.txt
113
+ - README.rdoc
114
+ - Rakefile
115
+ - examples/benchmarks.rb
116
+ - examples/stats.rb
117
+ - ext/hitimes/c/extconf.rb
118
+ - ext/hitimes/c/hitimes.c
119
+ - ext/hitimes/c/hitimes_instant_clock_gettime.c
120
+ - ext/hitimes/c/hitimes_instant_osx.c
121
+ - ext/hitimes/c/hitimes_instant_windows.c
122
+ - ext/hitimes/c/hitimes_interval.c
123
+ - ext/hitimes/c/hitimes_interval.h
124
+ - ext/hitimes/c/hitimes_stats.c
125
+ - ext/hitimes/c/hitimes_stats.h
126
+ - ext/hitimes/java/src/hitimes/Hitimes.java
127
+ - ext/hitimes/java/src/hitimes/HitimesInterval.java
128
+ - ext/hitimes/java/src/hitimes/HitimesService.java
129
+ - ext/hitimes/java/src/hitimes/HitimesStats.java
130
+ - lib/hitimes.rb
131
+ - lib/hitimes/metric.rb
132
+ - lib/hitimes/mutexed_stats.rb
133
+ - lib/hitimes/paths.rb
134
+ - lib/hitimes/stats.rb
135
+ - lib/hitimes/timed_metric.rb
136
+ - lib/hitimes/timed_value_metric.rb
137
+ - lib/hitimes/value_metric.rb
138
+ - lib/hitimes/version.rb
139
+ - spec/hitimes_spec.rb
140
+ - spec/interval_spec.rb
141
+ - spec/metric_spec.rb
142
+ - spec/mutex_stats_spec.rb
143
+ - spec/paths_spec.rb
144
+ - spec/spec_helper.rb
145
+ - spec/stats_spec.rb
146
+ - spec/timed_metric_spec.rb
147
+ - spec/timed_value_metric_spec.rb
148
+ - spec/value_metric_spec.rb
149
+ - spec/version_spec.rb
150
+ - tasks/default.rake
151
+ - tasks/extension.rake
152
+ - tasks/this.rb
153
+ - lib/hitimes/hitimes.jar
154
+ homepage: http://github.com/copiousfreetime/hitimes
160
155
  licenses: []
161
-
162
- post_install_message:
163
- rdoc_options:
164
- - --line-numbers
165
- - --main
166
- - README
167
- require_paths:
168
- - lib
169
- - ext
170
- required_ruby_version: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- segments:
175
- - 0
176
- version: "0"
177
- required_rubygems_version: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- segments:
182
- - 0
183
- version: "0"
156
+ post_install_message:
157
+ rdoc_options:
158
+ - "--main"
159
+ - README.rdoc
160
+ - "--markup"
161
+ - tomdoc
162
+ require_paths:
163
+ - lib
164
+ required_ruby_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: !binary |-
169
+ MA==
170
+ none: false
171
+ required_rubygems_version: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: !binary |-
176
+ MA==
177
+ none: false
184
178
  requirements: []
185
-
186
- rubyforge_project: copiousfreetime
187
- rubygems_version: 1.3.6
188
- signing_key:
179
+ rubyforge_project:
180
+ rubygems_version: 1.8.24
181
+ signing_key:
189
182
  specification_version: 3
190
- summary: Hitimes is a fast, high resolution timer library for recording performance metrics
191
- test_files: []
192
-
183
+ summary: Hitimes is a fast, high resolution timer library for recording performance metrics. It uses the appropriate low method calls for each system to get the highest granularity time increments possible.
184
+ test_files:
185
+ - spec/hitimes_spec.rb
186
+ - spec/interval_spec.rb
187
+ - spec/metric_spec.rb
188
+ - spec/mutex_stats_spec.rb
189
+ - spec/paths_spec.rb
190
+ - spec/spec_helper.rb
191
+ - spec/stats_spec.rb
192
+ - spec/timed_metric_spec.rb
193
+ - spec/timed_value_metric_spec.rb
194
+ - spec/value_metric_spec.rb
195
+ - spec/version_spec.rb
@@ -1,16 +0,0 @@
1
- #ifdef USE_INSTANT_OSX
2
-
3
- #include "hitimes_interval.h"
4
- #include <CoreServices/CoreServices.h>
5
-
6
- /*
7
- * returns the number of nanoseconds since the machine was booted
8
- */
9
- hitimes_instant_t hitimes_get_current_instant( )
10
- {
11
- Nanoseconds nano = AbsoluteToNanoseconds( UpTime() );
12
-
13
- return *( hitimes_instant_t *)&nano;
14
- }
15
-
16
- #endif
data/gemspec.rb DELETED
@@ -1,64 +0,0 @@
1
- require 'rubygems'
2
- require 'hitimes/version'
3
- require 'tasks/config'
4
-
5
- Hitimes::GEM_SPEC = Gem::Specification.new do |spec|
6
- proj = Configuration.for('project')
7
- spec.name = proj.name
8
- spec.version = Hitimes::VERSION
9
-
10
- spec.author = proj.author
11
- spec.email = proj.email
12
- spec.homepage = proj.homepage
13
- spec.summary = proj.summary
14
- spec.description = proj.description
15
- spec.platform = Gem::Platform::RUBY
16
-
17
-
18
- pkg = Configuration.for('packaging')
19
- spec.files = pkg.files.all
20
- spec.executables = pkg.files.bin.collect { |b| File.basename(b) }
21
-
22
- # add dependencies here
23
- spec.add_development_dependency("rake", "~> 0.8.1")
24
- spec.add_development_dependency("configuration", " ~> 0.0.5")
25
- spec.add_development_dependency( "json", "~> 1.1.3")
26
- spec.add_development_dependency( "rake-compiler", "~> 0.5.0")
27
-
28
- if ext_conf = Configuration.for_if_exist?("extension") then
29
- spec.extensions << ext_conf.configs
30
- spec.require_paths << 'ext'
31
- spec.extensions.flatten!
32
- end
33
-
34
- if rdoc = Configuration.for_if_exist?('rdoc') then
35
- spec.has_rdoc = true
36
- spec.extra_rdoc_files = pkg.files.rdoc
37
- spec.rdoc_options = rdoc.options + [ "--main" , rdoc.main_page ]
38
- else
39
- spec.has_rdoc = false
40
- end
41
-
42
- if test = Configuration.for_if_exist?('testing') then
43
- spec.test_files = test.files
44
- end
45
-
46
- if rf = Configuration.for_if_exist?('rubyforge') then
47
- spec.rubyforge_project = rf.project
48
- end
49
- end
50
-
51
- Hitimes::GEM_SPEC_MSWIN32 = Hitimes::GEM_SPEC.clone
52
- Hitimes::GEM_SPEC_MSWIN32.platform = ::Gem::Platform.new( "i386-mswin32" )
53
- Hitimes::GEM_SPEC_MSWIN32.extensions = []
54
-
55
- Hitimes::GEM_SPEC_MINGW32= Hitimes::GEM_SPEC.clone
56
- Hitimes::GEM_SPEC_MINGW32.platform = ::Gem::Platform.new( "i386-mingw32" )
57
- Hitimes::GEM_SPEC_MINGW32.extensions = []
58
-
59
- Hitimes::GEM_SPEC_JAVA = Hitimes::GEM_SPEC.clone
60
- Hitimes::GEM_SPEC_JAVA.platform = ::Gem::Platform.new( 'java' )
61
- Hitimes::GEM_SPEC_JAVA.extensions = []
62
-
63
- Hitimes::SPECS = [ Hitimes::GEM_SPEC, Hitimes::GEM_SPEC_MSWIN32, Hitimes::GEM_SPEC_MINGW32, Hitimes::GEM_SPEC_JAVA ]
64
-