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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -2
- data/lib/pry-auto_benching/version.rb +1 -1
- data/lib/pry-auto_benching.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13ec7e124f4696f88724706d64bf1a72099ea484aa1b7aa269a381fc84eb1f9f
|
4
|
+
data.tar.gz: b9e3c61b0b99d18686e3ab0c44848a0ab066e73309420a8fb130932e4def3138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30f653774322435fc6f17758f81dcb25f72d23802beaddf221c2d90caf459af1697f67cfd704df1aee8c35a961290b82295441a353170d9ad026df4b46d192fc
|
7
|
+
data.tar.gz: 7b0a124e1b42c7c81953345b8cad4840774c0426cb796da5716fd00e9b1881c965aadab99cbe678b757dc1100e38f70bc119d4c5d393c9eef863ee299320b64b
|
data/CHANGELOG.md
CHANGED
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
|
118
|
-
|
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
|
|
data/lib/pry-auto_benching.rb
CHANGED
@@ -34,9 +34,13 @@ module Pry::AutoBenching
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def <<(other)
|
37
|
-
@ary.
|
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
|
#
|