hitimes 1.3.0-java → 1.3.1-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +6 -0
- data/README.md +5 -3
- data/ext/hitimes/c/hitimes_instant_osx.c +4 -1
- data/ext/hitimes/java/src/hitimes/Hitimes.java +10 -13
- data/lib/hitimes/hitimes.jar +0 -0
- data/lib/hitimes/version.rb +1 -1
- data/tasks/this.rb +4 -4
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61b61f679bf56319c5a1f5f335d5986e0256188ec6c0a8eb7ec8971701d5c96a
|
4
|
+
data.tar.gz: cd9c29f44455b98dc716293bdd435954600905889c2708eeeb94a886738b28d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8173957068204b1ad984501a19519ec71b6fb6f54ea25ded38019ce406d49dda58a68de2caca4a8b40dc3188c3cc9c9f1f287add525f412532a56b9e1da016ae
|
7
|
+
data.tar.gz: cf93e616a682dfc5e8e03f03103f1c611664bb456986614107b0c8754c5bf6d305b9276dbfd4f189e4d0d0b19b21cdbe6deb4c39edc628094abff43b4dea89fb
|
data/HISTORY.md
CHANGED
@@ -1,4 +1,10 @@
|
|
1
1
|
# Hitimes Changelog
|
2
|
+
## Version 1.3.1 2019-01-18
|
3
|
+
|
4
|
+
* Update jruby extension to not use global runtime state (thanks @kares) (#70)
|
5
|
+
* Update travis CI config
|
6
|
+
* Update documentataion for Ruby 2.6
|
7
|
+
|
2
8
|
## Version 1.3.0 2018-06-15
|
3
9
|
|
4
10
|
* Add api method `Hitimes.raw_instant` to expose raw OS instant value
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/copiousfreetime/hitimes.svg?branch=master)](https://travis-ci.org/copiousfreetime/hitimes)
|
4
4
|
|
5
|
+
## Description
|
6
|
+
|
5
7
|
A fast, high resolution timer library for recording peformance metrics.
|
6
8
|
|
7
9
|
* [Homepage](http://github.com/copiousfreetime/hitimes)
|
@@ -159,14 +161,14 @@ Hitimes also follows [semantic versioning](http://semver.org/).
|
|
159
161
|
|
160
162
|
The current officially supported versions of Ruby are:
|
161
163
|
|
162
|
-
* MRI Ruby (all platforms) 2.
|
163
|
-
* JRuby 1.
|
164
|
+
* MRI Ruby (all platforms) 2.3 - 2.6
|
165
|
+
* JRuby 9.1.17.0, 9.2.X.X
|
164
166
|
|
165
167
|
Unofficially supported versions, these have been supported in the past when they
|
166
168
|
were the primary rubies around. In all likelihood they still work, but are not
|
167
169
|
supported.
|
168
170
|
|
169
|
-
* MRI Ruby (linux/mac/bsd/unix/etc) - everything from 1.8.7 to 2.
|
171
|
+
* MRI Ruby (linux/mac/bsd/unix/etc) - everything from 1.8.7 to 2.2
|
170
172
|
* MRI Ruby (windows) - 2.0 and up
|
171
173
|
* Ruby 1.8 and 1.9 for windows are supported in hitimes version 1.2.4 or earlier
|
172
174
|
* JRuby - I think everything back to 1.4
|
@@ -4,7 +4,10 @@
|
|
4
4
|
#include <mach/mach.h>
|
5
5
|
#include <mach/mach_time.h>
|
6
6
|
|
7
|
-
/* All this OSX code is adapted from
|
7
|
+
/* All this OSX code is adapted from
|
8
|
+
* https://developer.apple.com/library/archive/qa/qa1398/_index.html
|
9
|
+
*/
|
10
|
+
|
8
11
|
|
9
12
|
/*
|
10
13
|
* returns the conversion factor, this value is used to convert
|
@@ -3,20 +3,18 @@ package hitimes;
|
|
3
3
|
import java.lang.Math;
|
4
4
|
import java.lang.System;
|
5
5
|
|
6
|
-
import org.jruby.anno.JRubyClass;
|
7
|
-
import org.jruby.anno.JRubyMethod;
|
8
|
-
import org.jruby.anno.JRubyModule;
|
9
|
-
import org.jruby.anno.JRubyConstant;
|
10
|
-
import org.jruby.runtime.Visibility;
|
11
|
-
|
12
6
|
import org.jruby.Ruby;
|
13
7
|
import org.jruby.RubyClass;
|
14
8
|
import org.jruby.RubyException;
|
15
9
|
import org.jruby.RubyModule;
|
16
10
|
import org.jruby.RubyObject;
|
17
|
-
|
11
|
+
import org.jruby.anno.JRubyClass;
|
12
|
+
import org.jruby.anno.JRubyMethod;
|
13
|
+
import org.jruby.anno.JRubyModule;
|
14
|
+
import org.jruby.anno.JRubyConstant;
|
18
15
|
import org.jruby.exceptions.RaiseException;
|
19
|
-
|
16
|
+
import org.jruby.runtime.ThreadContext;
|
17
|
+
import org.jruby.runtime.Visibility;
|
20
18
|
import org.jruby.runtime.builtin.IRubyObject;
|
21
19
|
|
22
20
|
|
@@ -28,15 +26,14 @@ public class Hitimes {
|
|
28
26
|
|
29
27
|
public static final double INSTANT_CONVERSION_FACTOR = 1000000000d;
|
30
28
|
|
31
|
-
private static final Ruby __ruby__ = Ruby.getGlobalRuntime();
|
32
|
-
|
33
29
|
public static RubyClass hitimesIntervalClass;
|
30
|
+
|
34
31
|
/**
|
35
32
|
* Create the Hitimes module and add it to the Ruby runtime.
|
36
33
|
*/
|
37
34
|
public static RubyModule createHitimesModule( Ruby runtime ) {
|
38
35
|
RubyModule mHitimes = runtime.defineModule("Hitimes");
|
39
|
-
mHitimes.defineConstant("INSTANT_CONVERSION_FACTOR",
|
36
|
+
mHitimes.defineConstant("INSTANT_CONVERSION_FACTOR", runtime.newFloat(INSTANT_CONVERSION_FACTOR));
|
40
37
|
mHitimes.defineAnnotatedMethods( Hitimes.class );
|
41
38
|
|
42
39
|
RubyClass cStandardError = runtime.getStandardError();
|
@@ -59,8 +56,8 @@ public class Hitimes {
|
|
59
56
|
|
60
57
|
|
61
58
|
@JRubyMethod( name = "raw_instant", module = true )
|
62
|
-
public static IRubyObject rawInstant(IRubyObject self) {
|
63
|
-
|
59
|
+
public static IRubyObject rawInstant(ThreadContext context, IRubyObject self) {
|
60
|
+
return context.runtime.newFixnum( System.nanoTime() );
|
64
61
|
}
|
65
62
|
|
66
63
|
}
|
data/lib/hitimes/hitimes.jar
CHANGED
Binary file
|
data/lib/hitimes/version.rb
CHANGED
data/tasks/this.rb
CHANGED
@@ -28,7 +28,7 @@ class ThisProject
|
|
28
28
|
@exclude_from_manifest = Regexp.union(/\.(git|DS_Store)/,
|
29
29
|
/^(doc|coverage|pkg|tmp|Gemfile(\.lock)?)/,
|
30
30
|
/^[^\/]+\.gemspec/,
|
31
|
-
/\.(swp|jar|bundle|so|rvmrc|travis.yml)$/,
|
31
|
+
/\.(swp|jar|bundle|so|rvmrc|travis.yml|byebug_history)$/,
|
32
32
|
/~$/)
|
33
33
|
@gemspecs = Hash.new
|
34
34
|
yield self if block_given?
|
@@ -146,7 +146,7 @@ class ThisProject
|
|
146
146
|
spec.rdoc_options = [ "--main" , 'README.md',
|
147
147
|
"--markup", "tomdoc" ]
|
148
148
|
|
149
|
-
spec.required_ruby_version = '>=
|
149
|
+
spec.required_ruby_version = '>= 2.2.2'
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
@@ -178,9 +178,9 @@ class ThisProject
|
|
178
178
|
(RUBY_PLATFORM == "java") ? 'java' : Gem::Platform::RUBY
|
179
179
|
end
|
180
180
|
|
181
|
-
# Internal: Return the
|
181
|
+
# Internal: Return the Description section of the README.rdoc file
|
182
182
|
def description_section
|
183
|
-
section_of( 'README.md', '
|
183
|
+
section_of( 'README.md', 'Description')
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Jeremy Hinegardner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,10 +108,9 @@ dependencies:
|
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.14'
|
111
|
-
description:
|
112
|
-
|
113
|
-
|
114
|
-
\ dot org * `git clone url git://github.com/copiousfreetime/hitimes.git`"
|
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`
|
115
114
|
email: jeremy@copiousfreetime.org
|
116
115
|
executables: []
|
117
116
|
extensions: []
|
@@ -182,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
182
181
|
requirements:
|
183
182
|
- - ">="
|
184
183
|
- !ruby/object:Gem::Version
|
185
|
-
version:
|
184
|
+
version: 2.2.2
|
186
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
187
186
|
requirements:
|
188
187
|
- - ">="
|
@@ -193,7 +192,7 @@ rubyforge_project:
|
|
193
192
|
rubygems_version: 2.7.6
|
194
193
|
signing_key:
|
195
194
|
specification_version: 4
|
196
|
-
summary:
|
195
|
+
summary: A fast, high resolution timer library for recording peformance metrics.
|
197
196
|
test_files:
|
198
197
|
- spec/hitimes_spec.rb
|
199
198
|
- spec/interval_spec.rb
|