time_bandits 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/run-tests.yml +1 -1
- data/Appraisals +1 -1
- data/lib/time_bandits/time_consumers/garbage_collection.rb +7 -2
- data/lib/time_bandits/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be90aa917ea9d4256501dc921da7fea5c9f1c9608f89fc7e5e5dace634b0353f
|
4
|
+
data.tar.gz: 29d87ff61dfa62a3202434df9d687ae9dc8e9d5e6e4b9e0ef4709049b7abee51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6692b8d8d10889442cc67f583fb6b98535f6a7ab3b060698c9dfef256f933bb976670dd1e672ba16a63d085d5238ade7704e7c1e9240ffc3da67d60e9a33435
|
7
|
+
data.tar.gz: b98ab1c3669dd66162199ad6a78bf113a598b8836a0a793404fa1dd28248fc43751ad32439ae03b3732a16f7476ad2109cacdc2c9cc7b57eec24ecb07475c460
|
data/Appraisals
CHANGED
@@ -4,7 +4,7 @@ appraisals = [
|
|
4
4
|
]
|
5
5
|
|
6
6
|
appraisals.insert(0, "5.2.6") if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0")
|
7
|
-
appraisals << "7.0.
|
7
|
+
appraisals << "7.0.1" if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.7.0")
|
8
8
|
|
9
9
|
appraisals.each do |rails_version|
|
10
10
|
appraise "activesupport-#{rails_version}" do
|
@@ -29,6 +29,8 @@ module TimeBandits
|
|
29
29
|
|
30
30
|
if GC.respond_to?(:time)
|
31
31
|
def _get_gc_time; GC.time; end
|
32
|
+
elsif GC.respond_to?(:total_time)
|
33
|
+
def _get_gc_time; GC.total_time / 1000; end
|
32
34
|
else
|
33
35
|
def _get_gc_time; 0; end
|
34
36
|
end
|
@@ -40,7 +42,8 @@ module TimeBandits
|
|
40
42
|
if GC.respond_to?(:total_malloced_bytes)
|
41
43
|
def _get_allocated_size; GC.total_malloced_bytes; end
|
42
44
|
else
|
43
|
-
|
45
|
+
# this will wrap around :malloc_increase_bytes_limit so is not really correct
|
46
|
+
def _get_allocated_size; GC.stat(:malloc_increase_bytes); end
|
44
47
|
end
|
45
48
|
|
46
49
|
if GC.respond_to?(:heap_slots)
|
@@ -81,7 +84,9 @@ module TimeBandits
|
|
81
84
|
end
|
82
85
|
|
83
86
|
def allocated_size
|
84
|
-
|
87
|
+
new_size = _get_allocated_size
|
88
|
+
old_size = @allocated_size
|
89
|
+
new_size <= old_size ? new_size : new_size - old_size
|
85
90
|
end
|
86
91
|
|
87
92
|
def heap_growth
|
data/lib/time_bandits/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: time_bandits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Kaes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thread_variables
|