stackprof 0.2.18 → 0.2.19
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 +4 -4
- data/ext/stackprof/stackprof.c +2 -2
- data/lib/stackprof.rb +1 -1
- data/stackprof.gemspec +1 -1
- data/test/test_stackprof.rb +5 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6662250e5e20ee3388bfce740a053c83e53fe9304b518ad22f0ce9ffc5d10077
|
4
|
+
data.tar.gz: 7480e1896e253bd530573fc2f66b3d7690db97bee3f892c77729b75c2dc8c94e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f92e6401b16f83d9398b94e8b0506f597a785a19e1552245f39e1c77ab0c2d3d40186b8b05f91972b6d899995718c28e1724acff97248d497a3768deed601bb
|
7
|
+
data.tar.gz: 0663a1cdac8730bcbc4dd68750fffa6885b72eca7c37915191b6ff44ff101349ba274648b6641531c1bfff34144179b76d527ca8426db91af2c0536629f6ee65
|
data/ext/stackprof/stackprof.c
CHANGED
@@ -615,7 +615,7 @@ stackprof_buffer_sample(void)
|
|
615
615
|
struct timestamp_t t;
|
616
616
|
capture_timestamp(&t);
|
617
617
|
start_timestamp = timestamp_usec(&t);
|
618
|
-
timestamp_delta = delta_usec(&
|
618
|
+
timestamp_delta = delta_usec(&_stackprof.last_sample_at, &t);
|
619
619
|
}
|
620
620
|
|
621
621
|
num = rb_profile_frames(0, sizeof(_stackprof.frames_buffer) / sizeof(VALUE), _stackprof.frames_buffer, _stackprof.lines_buffer);
|
@@ -638,7 +638,7 @@ stackprof_record_gc_samples(void)
|
|
638
638
|
|
639
639
|
// We don't know when the GC samples were actually marked, so let's
|
640
640
|
// assume that they were marked at a perfectly regular interval.
|
641
|
-
delta_to_first_unrecorded_gc_sample = delta_usec(&
|
641
|
+
delta_to_first_unrecorded_gc_sample = delta_usec(&_stackprof.last_sample_at, &t) - (_stackprof.unrecorded_gc_samples - 1) * NUM2LONG(_stackprof.interval);
|
642
642
|
if (delta_to_first_unrecorded_gc_sample < 0) {
|
643
643
|
delta_to_first_unrecorded_gc_sample = 0;
|
644
644
|
}
|
data/lib/stackprof.rb
CHANGED
data/stackprof.gemspec
CHANGED
data/test/test_stackprof.rb
CHANGED
@@ -131,6 +131,7 @@ class StackProfTest < MiniTest::Test
|
|
131
131
|
profile = StackProf.run(mode: :custom, raw: true) do
|
132
132
|
10.times do
|
133
133
|
StackProf.sample
|
134
|
+
sleep 0.0001
|
134
135
|
end
|
135
136
|
end
|
136
137
|
|
@@ -153,6 +154,10 @@ class StackProfTest < MiniTest::Test
|
|
153
154
|
assert_equal 10, profile[:raw_timestamp_deltas].size
|
154
155
|
total_duration = after_monotonic - before_monotonic
|
155
156
|
assert_operator profile[:raw_timestamp_deltas].inject(&:+), :<, total_duration
|
157
|
+
|
158
|
+
profile[:raw_timestamp_deltas].each do |delta|
|
159
|
+
assert_operator delta, :>, 0
|
160
|
+
end
|
156
161
|
end
|
157
162
|
|
158
163
|
def test_metadata
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stackprof
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aman Gupta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -94,9 +94,9 @@ licenses:
|
|
94
94
|
- MIT
|
95
95
|
metadata:
|
96
96
|
bug_tracker_uri: https://github.com/tmm1/stackprof/issues
|
97
|
-
changelog_uri: https://github.com/tmm1/stackprof/blob/v0.2.
|
98
|
-
documentation_uri: https://www.rubydoc.info/gems/stackprof/0.2.
|
99
|
-
source_code_uri: https://github.com/tmm1/stackprof/tree/v0.2.
|
97
|
+
changelog_uri: https://github.com/tmm1/stackprof/blob/v0.2.19/CHANGELOG.md
|
98
|
+
documentation_uri: https://www.rubydoc.info/gems/stackprof/0.2.19
|
99
|
+
source_code_uri: https://github.com/tmm1/stackprof/tree/v0.2.19
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|
102
102
|
require_paths:
|