pry-auto_benching.rb 2.9.0 → 2.9.1

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: '086d0b0371cbbff9c5cb93ac7ef4536fdf3bde5776dd44cd7cb6f0b404866b74'
4
- data.tar.gz: 692d1991ab9d61b6c31a7c2fd26135b8fa03cc0a5902b46ef92da88125714ce1
3
+ metadata.gz: 13ec7e124f4696f88724706d64bf1a72099ea484aa1b7aa269a381fc84eb1f9f
4
+ data.tar.gz: b9e3c61b0b99d18686e3ab0c44848a0ab066e73309420a8fb130932e4def3138
5
5
  SHA512:
6
- metadata.gz: 00d204f115402bd359a66ad6e005c3cb689010c5c9870bc1cdf917ed44888c9eca37c885ffadc0fb0698802bdce01b39f318462b86d6c5484abb7c905502abe8
7
- data.tar.gz: f3f2a9461823ce515ce1bd1e3971ffc2d74d2889a4ac0c6daa8f4999b8d8c6df73c41ef87c2da67a27e0e4d7cb12f5f7fa060d604fddccd2918538f3323ffab0
6
+ metadata.gz: 30f653774322435fc6f17758f81dcb25f72d23802beaddf221c2d90caf459af1697f67cfd704df1aee8c35a961290b82295441a353170d9ad026df4b46d192fc
7
+ data.tar.gz: 7b0a124e1b42c7c81953345b8cad4840774c0426cb796da5716fd00e9b1881c965aadab99cbe678b757dc1100e38f70bc119d4c5d393c9eef863ee299320b64b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2.9.1
4
+
5
+ * Fix a bug where `MomentList` would not cycle oldest entries first.
6
+
3
7
  ## v2.9.0
4
8
 
5
9
  * Add '--target-display' option (shorthand: '-t') to the `auto-benching` command.
data/README.md CHANGED
@@ -114,8 +114,13 @@ Benchmarking `sleep 0.01` shows no overhead in the results:
114
114
  [2] 0.01s (main)>
115
115
 
116
116
  But it is possible results can be reported inaccurately since the measurement
117
- includes a **very** small number of method calls to Pry internals. The overhead should be
118
- minimal and skew results by a margin that could be considered negligible.
117
+ includes a **very** small number of method calls to Pry internals, and it could
118
+ include time spent by other Pry plugins. I have seen inaccuracies of up to
119
+ 10ms (0.01) but not all the time.
120
+
121
+ The overhead should be minimal and skew results by a margin that could be considered
122
+ negligible, although other Pry plugins running before/after eval hooks
123
+ and spending a lot of time doing so could skew results more than is expected.
119
124
 
120
125
  ## Integration with custom prompts
121
126
 
@@ -1,5 +1,5 @@
1
1
  class Pry
2
2
  module AutoBenching
3
- VERSION = "2.9.0"
3
+ VERSION = "2.9.1"
4
4
  end
5
5
  end
@@ -34,9 +34,13 @@ module Pry::AutoBenching
34
34
  end
35
35
 
36
36
  def <<(other)
37
- @ary.pop while @ary.size >= @pry.config.auto_benching.max_history_size
37
+ @ary.shift if @ary.size + 1 > max_size
38
38
  @ary << other
39
39
  end
40
+
41
+ def max_size
42
+ @pry.config.auto_benching.max_history_size
43
+ end
40
44
  end
41
45
 
42
46
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-auto_benching.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0
4
+ version: 2.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Gleeson