liquid-ext 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/liquid/benchmark.rb +3 -3
- data/lib/liquid/boot.rb +2 -4
- data/lib/liquid/timing.rb +44 -0
- data/liquid-ext.gemspec +1 -1
- metadata +45 -44
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZThhMTQ2MTAyNzkxNzM2YTM5NmRmZWM5NGE5ODVhNTM2MjNiNTlkMA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2JkZTA4MWViZGRmMTgwNDBiODNkYmE2YzdmYzY5YjcyZGY1Y2I0OQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MmI1MjFhMGY2NzE2NjM3NzYwNzU5NTY5NGZhYzVkOTE3YmJlYzcyNTA3NjI0
|
10
|
+
Mzk0ZDBjYjliZjYyY2Q2MjViZTBjNGM3MjVjY2ZiY2E1ZDlkYmM4OTAyMDMx
|
11
|
+
YzA2NmRhZWQ3MzNlMTAyM2ExMDEwM2E3OGFkNzZiNmJhYjEwOWQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NGRiY2YyYWFhMDVhNTY0NjE2YzczODE4YTMzZmY3OTU4MDQ0MmRkNzU5ZTFm
|
14
|
+
ZGExNDRkM2JlM2ZmNTA4MDdmMzVhNzUyMzIxYTAxZDgzYzUxYjFiZWQ1MjBi
|
15
|
+
ODUwMjZjZDhiMzY3M2ExNmRkNmZhMDZhMTBiY2UwNmYxNTNmZmY=
|
data/lib/liquid/benchmark.rb
CHANGED
data/lib/liquid/boot.rb
CHANGED
@@ -75,12 +75,10 @@ Dir[File.join(File.dirname(__FILE__), 'ext', '*.rb')].each do |f|
|
|
75
75
|
require f
|
76
76
|
end
|
77
77
|
|
78
|
-
|
79
|
-
require 'liquid/benchmark'
|
80
|
-
end
|
81
|
-
|
78
|
+
require 'liquid/benchmark'
|
82
79
|
require 'liquid/cli'
|
83
80
|
require 'liquid/environment'
|
84
81
|
require 'liquid/from_file'
|
85
82
|
require 'liquid/hash_helper'
|
83
|
+
require 'liquid/timing'
|
86
84
|
require 'liquid/transaction_id'
|
@@ -0,0 +1,44 @@
|
|
1
|
+
java_import 'java.lang.System' if RUBY_PLATFORM == 'java'
|
2
|
+
|
3
|
+
module Timing
|
4
|
+
def self.start
|
5
|
+
TimingContext.new
|
6
|
+
end
|
7
|
+
|
8
|
+
class TimingContext
|
9
|
+
def initialize
|
10
|
+
@jruby = RUBY_PLATFORM == 'java'
|
11
|
+
reset!
|
12
|
+
end
|
13
|
+
|
14
|
+
def reset!
|
15
|
+
@start = @last_tick = now
|
16
|
+
end
|
17
|
+
|
18
|
+
def tick
|
19
|
+
rt = runtime_since(@last_tick)
|
20
|
+
@last_tick = now
|
21
|
+
rt
|
22
|
+
end
|
23
|
+
|
24
|
+
def stop
|
25
|
+
rt = runtime_since(@start)
|
26
|
+
reset!
|
27
|
+
rt
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def now
|
33
|
+
return System.nano_time if @jruby
|
34
|
+
return Time.now.to_f
|
35
|
+
end
|
36
|
+
|
37
|
+
def runtime_since(start)
|
38
|
+
rt = now - start
|
39
|
+
rt = rt.to_f / 1_000_000_000 if @jruby
|
40
|
+
rt
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
end
|
data/liquid-ext.gemspec
CHANGED
metadata
CHANGED
@@ -1,99 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquid-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LiquidM, Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
15
|
requirement: !ruby/object:Gem::Requirement
|
21
16
|
requirements:
|
22
|
-
- - '>='
|
17
|
+
- - ! '>='
|
23
18
|
- !ruby/object:Gem::Version
|
24
19
|
version: '0'
|
25
|
-
prerelease: false
|
26
20
|
type: :runtime
|
27
|
-
|
28
|
-
name: ffi
|
21
|
+
prerelease: false
|
29
22
|
version_requirements: !ruby/object:Gem::Requirement
|
30
23
|
requirements:
|
31
|
-
- - '>='
|
24
|
+
- - ! '>='
|
32
25
|
- !ruby/object:Gem::Version
|
33
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ffi
|
34
29
|
requirement: !ruby/object:Gem::Requirement
|
35
30
|
requirements:
|
36
|
-
- - '>='
|
31
|
+
- - ! '>='
|
37
32
|
- !ruby/object:Gem::Version
|
38
33
|
version: '0'
|
39
|
-
prerelease: false
|
40
34
|
type: :runtime
|
41
|
-
|
42
|
-
name: liquid-logging
|
35
|
+
prerelease: false
|
43
36
|
version_requirements: !ruby/object:Gem::Requirement
|
44
37
|
requirements:
|
45
|
-
- - '>='
|
38
|
+
- - ! '>='
|
46
39
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: liquid-logging
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
44
|
requirements:
|
50
|
-
- - '>='
|
45
|
+
- - ! '>='
|
51
46
|
- !ruby/object:Gem::Version
|
52
47
|
version: 2.0.0
|
53
|
-
prerelease: false
|
54
48
|
type: :runtime
|
55
|
-
|
56
|
-
name: metriks
|
49
|
+
prerelease: false
|
57
50
|
version_requirements: !ruby/object:Gem::Requirement
|
58
51
|
requirements:
|
59
|
-
- - '>='
|
52
|
+
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
54
|
+
version: 2.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: metriks
|
62
57
|
requirement: !ruby/object:Gem::Requirement
|
63
58
|
requirements:
|
64
|
-
- - '>='
|
59
|
+
- - ! '>='
|
65
60
|
- !ruby/object:Gem::Version
|
66
61
|
version: '0'
|
67
|
-
prerelease: false
|
68
62
|
type: :runtime
|
69
|
-
|
70
|
-
name: mixlib-cli
|
63
|
+
prerelease: false
|
71
64
|
version_requirements: !ruby/object:Gem::Requirement
|
72
65
|
requirements:
|
73
|
-
- - '>='
|
66
|
+
- - ! '>='
|
74
67
|
- !ruby/object:Gem::Version
|
75
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mixlib-cli
|
76
71
|
requirement: !ruby/object:Gem::Requirement
|
77
72
|
requirements:
|
78
|
-
- - '>='
|
73
|
+
- - ! '>='
|
79
74
|
- !ruby/object:Gem::Version
|
80
75
|
version: '0'
|
81
|
-
prerelease: false
|
82
76
|
type: :runtime
|
83
|
-
|
84
|
-
name: terminal-table
|
77
|
+
prerelease: false
|
85
78
|
version_requirements: !ruby/object:Gem::Requirement
|
86
79
|
requirements:
|
87
|
-
- - '>='
|
80
|
+
- - ! '>='
|
88
81
|
- !ruby/object:Gem::Version
|
89
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: terminal-table
|
90
85
|
requirement: !ruby/object:Gem::Requirement
|
91
86
|
requirements:
|
92
|
-
- - '>='
|
87
|
+
- - ! '>='
|
93
88
|
- !ruby/object:Gem::Version
|
94
89
|
version: '0'
|
95
|
-
prerelease: false
|
96
90
|
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
97
|
description: Ruby core extensions and helper libraries
|
98
98
|
email:
|
99
99
|
- opensource@liquidm.com
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/liquid/tasks/router.rake
|
136
136
|
- lib/liquid/tasks/rspec.rake
|
137
137
|
- lib/liquid/tasks/yard.rake
|
138
|
+
- lib/liquid/timing.rb
|
138
139
|
- lib/liquid/transaction_id.rb
|
139
140
|
- liquid-ext.gemspec
|
140
141
|
- spec/lib/liquid/ext/enumerable_spec.rb
|
@@ -144,28 +145,28 @@ homepage: https://github.com/liquidm/ext
|
|
144
145
|
licenses:
|
145
146
|
- MIT
|
146
147
|
metadata: {}
|
147
|
-
post_install_message:
|
148
|
+
post_install_message:
|
148
149
|
rdoc_options: []
|
149
150
|
require_paths:
|
150
151
|
- lib
|
151
152
|
required_ruby_version: !ruby/object:Gem::Requirement
|
152
153
|
requirements:
|
153
|
-
- - '>='
|
154
|
+
- - ! '>='
|
154
155
|
- !ruby/object:Gem::Version
|
155
156
|
version: '0'
|
156
157
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
158
|
requirements:
|
158
|
-
- - '>='
|
159
|
+
- - ! '>='
|
159
160
|
- !ruby/object:Gem::Version
|
160
161
|
version: '0'
|
161
162
|
requirements: []
|
162
|
-
rubyforge_project:
|
163
|
-
rubygems_version: 2.1.
|
164
|
-
signing_key:
|
163
|
+
rubyforge_project:
|
164
|
+
rubygems_version: 2.1.11
|
165
|
+
signing_key:
|
165
166
|
specification_version: 4
|
166
167
|
summary: Ruby core extensions and helper libraries
|
167
168
|
test_files:
|
168
169
|
- spec/lib/liquid/ext/enumerable_spec.rb
|
169
170
|
- spec/lib/liquid/router_spec.rb
|
170
171
|
- spec/spec_helper.rb
|
171
|
-
has_rdoc:
|
172
|
+
has_rdoc:
|