vernier 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f250b62a547d9c79e6d7beb4382c4d8bdde8e2245e868c3ac5b8d5354e2929b
4
- data.tar.gz: e900e786f82b759edc4dc83d5c9bfe37048ca3eca62a1352cef54e1ad2822069
3
+ metadata.gz: 0e53177832167777357ffdfc79c26f1957a8707804cb85349560faa6d433fd49
4
+ data.tar.gz: bc89ef70d31f160e8a874c27a2b9bb6479c1a4e631549dd4ac583b7137177660
5
5
  SHA512:
6
- metadata.gz: 49bf98de660939233cfdd7c256d4976dea3438ebaaf1bfd3b31dfa273d5b4d9da07e86cef98336fdc2178cfa56c368f5d68593c0449e424c8f9982dcb8d4155f
7
- data.tar.gz: 5a78302e03fb52cb2e8ad69019ed3ed3be4cdc13f9ab86a86231013d8ca574595da34c00bc65ee6336a624cebad7d0ccd1b761eaffa3f6e3bc711fdcdb5cbbfc
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
@@ -672,10 +672,6 @@ StackTable::stack_table_convert(VALUE self, VALUE original_tableval, VALUE origi
672
672
  StackTable *original_table = get_stack_table(original_tableval);
673
673
  int original_idx = NUM2INT(original_idxval);
674
674
 
675
- if (original_idx == -1) {
676
- return original_idxval;
677
- }
678
-
679
675
  int original_size;
680
676
  {
681
677
  const std::lock_guard<std::mutex> lock(original_table->stack_mutex);
@@ -1027,13 +1023,15 @@ class SampleList {
1027
1023
  }
1028
1024
 
1029
1025
  void record_sample(int stack_index, TimeStamp time, Category category) {
1030
- if (
1031
- !empty() &&
1032
- stacks.back() == stack_index &&
1033
- categories.back() == category)
1034
- {
1035
- // We don't compare timestamps for de-duplication
1036
- weights.back() += 1;
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;
1037
1035
  } else {
1038
1036
  stacks.push_back(stack_index);
1039
1037
  timestamps.push_back(time);
@@ -102,7 +102,7 @@ module Vernier
102
102
  end
103
103
 
104
104
  def line
105
- result.frame_line_idx(idx)
105
+ result._stack_table.frame_line_no(idx)
106
106
  end
107
107
 
108
108
  def to_s
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vernier
4
- VERSION = "1.1.1"
4
+ VERSION = "1.1.2"
5
5
  end
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
- spec.required_ruby_version = ">= 3.2.1"
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.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-07-07 00:00:00.000000000 Z
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.9
120
+ rubygems_version: 3.5.11
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: A next generation CRuby profiler