vernier 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/vernier +3 -0
- data/ext/vernier/vernier.cc +9 -20
- data/lib/vernier/output/firefox.rb +9 -1
- data/lib/vernier/result.rb +1 -1
- data/lib/vernier/version.rb +1 -1
- data/vernier.gemspec +4 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e53177832167777357ffdfc79c26f1957a8707804cb85349560faa6d433fd49
|
4
|
+
data.tar.gz: bc89ef70d31f160e8a874c27a2b9bb6479c1a4e631549dd4ac583b7137177660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 642f607cc4998decb398e88dd196b920ae9592c139fdf7527ad7feb383579b22ff697fa4dede77d62866784415f798d8b020cdb0f8122cb30ea02a6fa66cc7cb
|
7
|
+
data.tar.gz: '03749312aad61f1c336863dece9417afc01df487a6f3f44f7c55e94fcb81b9df32e2aabd232b61a22b7add89f969cfe2a685816ea38cfd66447ac2f7813ed96a'
|
data/exe/vernier
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require "optparse"
|
4
|
+
require "vernier/version"
|
4
5
|
|
5
6
|
banner = <<-END
|
6
7
|
Usage: vernier run [FLAGS] -- COMMAND
|
@@ -10,6 +11,8 @@ END
|
|
10
11
|
|
11
12
|
options = {}
|
12
13
|
parser = OptionParser.new(banner) do |o|
|
14
|
+
o.version = Vernier::VERSION
|
15
|
+
|
13
16
|
o.on('--output [FILENAME]', String, "output filename") do |s|
|
14
17
|
options[:output] = s
|
15
18
|
end
|
data/ext/vernier/vernier.cc
CHANGED
@@ -554,19 +554,6 @@ struct StackTable {
|
|
554
554
|
}
|
555
555
|
}
|
556
556
|
|
557
|
-
// FIXME: probably should remove
|
558
|
-
void clear() {
|
559
|
-
frame_map.clear();
|
560
|
-
func_map.clear();
|
561
|
-
func_info_list.clear();
|
562
|
-
|
563
|
-
{
|
564
|
-
const std::lock_guard<std::mutex> lock(stack_mutex);
|
565
|
-
stack_node_list.clear();
|
566
|
-
root_stack_node.children.clear();
|
567
|
-
}
|
568
|
-
}
|
569
|
-
|
570
557
|
StackNode *convert_stack(StackTable &other, int original_idx) {
|
571
558
|
if (original_idx < 0) {
|
572
559
|
return &root_stack_node;
|
@@ -1036,13 +1023,15 @@ class SampleList {
|
|
1036
1023
|
}
|
1037
1024
|
|
1038
1025
|
void record_sample(int stack_index, TimeStamp time, Category category) {
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1026
|
+
// FIXME: probably better to avoid generating -1 higher up.
|
1027
|
+
// Currently this happens when we measure an empty stack. Ideally we would have a better representation
|
1028
|
+
if (stack_index < 0)
|
1029
|
+
return;
|
1030
|
+
|
1031
|
+
if (!empty() && stacks.back() == stack_index &&
|
1032
|
+
categories.back() == category) {
|
1033
|
+
// We don't compare timestamps for de-duplication
|
1034
|
+
weights.back() += 1;
|
1046
1035
|
} else {
|
1047
1036
|
stacks.push_back(stack_index);
|
1048
1037
|
timestamps.push_back(time);
|
@@ -213,7 +213,6 @@ module Vernier
|
|
213
213
|
@profile = profile
|
214
214
|
@categorizer = categorizer
|
215
215
|
@tid = tid
|
216
|
-
@allocations = allocations
|
217
216
|
@name = name
|
218
217
|
@is_main = is_main
|
219
218
|
if is_main.nil?
|
@@ -227,6 +226,15 @@ module Vernier
|
|
227
226
|
|
228
227
|
@samples = samples
|
229
228
|
|
229
|
+
if allocations
|
230
|
+
allocation_samples = allocations[:samples].dup
|
231
|
+
allocation_samples.map! do |sample|
|
232
|
+
@stack_table.convert(profile._stack_table, sample)
|
233
|
+
end
|
234
|
+
allocations = allocations.merge(samples: allocation_samples)
|
235
|
+
end
|
236
|
+
@allocations = allocations
|
237
|
+
|
230
238
|
timestamps ||= [0] * samples.size
|
231
239
|
@weights, @timestamps = weights, timestamps
|
232
240
|
@sample_categories = sample_categories || ([0] * samples.size)
|
data/lib/vernier/result.rb
CHANGED
data/lib/vernier/version.rb
CHANGED
data/vernier.gemspec
CHANGED
@@ -12,7 +12,10 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = "Next-generation Ruby 3.2.1+ sampling profiler. Tracks multiple threads, GVL activity, GC pauses, idle time, and more."
|
13
13
|
spec.homepage = "https://github.com/jhawthorn/vernier"
|
14
14
|
spec.license = "MIT"
|
15
|
-
|
15
|
+
|
16
|
+
unless ENV["IGNORE_REQUIRED_RUBY_VERSION"]
|
17
|
+
spec.required_ruby_version = ">= 3.2.1"
|
18
|
+
end
|
16
19
|
|
17
20
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
21
|
spec.metadata["source_code_uri"] = spec.homepage
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vernier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Hawthorn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.5.
|
120
|
+
rubygems_version: 3.5.11
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: A next generation CRuby profiler
|