timeasure 0.2.0 → 0.2.1
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/CHANGELOG.md +5 -0
- data/README.md +12 -0
- data/lib/timeasure/measurement.rb +3 -3
- data/lib/timeasure/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a4a771f40d4798ef2953ed82e279ef7771f0ab2
|
4
|
+
data.tar.gz: 9f9ae33de602ba24f8834bd9f9dc78bd8ba69fdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3539d8767e62635f9873d8de4ae6d9b53810c6cd10907b0c31bdd9cd2213927142c18ae14cbb1fe8361e4c8b5710a9730887a7214516a7c452550b3d386f3f84
|
7
|
+
data.tar.gz: a07150502caed6422f7b749cdeb8cc19ffc2027c7eaf30aa8dcae67dcf7d5a0a90e5a37d0416c2205531d4d6907128e2bb26e072ddb35bacd0880dc4ce746bc5
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.2.1] - 2018-12-12
|
10
|
+
### Changed
|
11
|
+
- Internal implementation of the Measurement class to avoid unneeded re-calculation of constant values.
|
12
|
+
|
13
|
+
|
9
14
|
## [0.2.0] - 2018-03-12
|
10
15
|
### Added
|
11
16
|
- New class macros for tracking private methods in both inline and scoped visibility declaration.
|
data/README.md
CHANGED
@@ -259,6 +259,18 @@ end
|
|
259
259
|
Timeasure will not come into action if the expression in the block evaluates to `false`.
|
260
260
|
By default this block evaluates to `true`.
|
261
261
|
|
262
|
+
In case you are loading files manually (probably not on Rails), you can add this to *spec_helper.rb*:
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
RSpec.configure do |config|
|
266
|
+
config.before(:suite) do
|
267
|
+
Timeasure.configure do |configuration|
|
268
|
+
configuration.enable_timeasure_proc = lambda { false }
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
```
|
273
|
+
|
262
274
|
|
263
275
|
## Feature Requests
|
264
276
|
|
@@ -12,15 +12,15 @@ module Timeasure
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def runtime_in_milliseconds
|
15
|
-
(@t1 - @t0) * 1000
|
15
|
+
@runtime_in_milliseconds ||= (@t1 - @t0) * 1000
|
16
16
|
end
|
17
17
|
|
18
18
|
def full_path
|
19
|
-
@segment.nil? ? method_path : "#{method_path}:#{@segment}"
|
19
|
+
@full_path ||= @segment.nil? ? method_path : "#{method_path}:#{@segment}"
|
20
20
|
end
|
21
21
|
|
22
22
|
def method_path
|
23
|
-
"#{@klass_name}##{@method_name}"
|
23
|
+
@method_path ||= "#{@klass_name}##{@method_name}"
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/timeasure/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timeasure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eliav Lavi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|