timeasure 0.2.0 → 0.2.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
  SHA1:
3
- metadata.gz: 646792d500a9a61b929dd067f9c1b48b9bf30b2d
4
- data.tar.gz: 1c0b5af7065eb1a950e201521ca7ec2f5c644964
3
+ metadata.gz: 3a4a771f40d4798ef2953ed82e279ef7771f0ab2
4
+ data.tar.gz: 9f9ae33de602ba24f8834bd9f9dc78bd8ba69fdc
5
5
  SHA512:
6
- metadata.gz: 81af656e98f415dddf152dbec13530c84d4506c64eac0fd13b6f217aad76598dd10251c18239de1c9b69eb8fabc18d732531ce45fe188a73a144453580be486a
7
- data.tar.gz: b2062fb31932f6087a6ec43b7f8f7991a868f8b8ff4081e7579358fa9798a1438e377144a257cedc2d36aec0a6570ba772b3c07d8d2fc0bbc9d366b289cc7919
6
+ metadata.gz: 3539d8767e62635f9873d8de4ae6d9b53810c6cd10907b0c31bdd9cd2213927142c18ae14cbb1fe8361e4c8b5710a9730887a7214516a7c452550b3d386f3f84
7
+ data.tar.gz: a07150502caed6422f7b749cdeb8cc19ffc2027c7eaf30aa8dcae67dcf7d5a0a90e5a37d0416c2205531d4d6907128e2bb26e072ddb35bacd0880dc4ce746bc5
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Timeasure
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
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.0
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-03-12 00:00:00.000000000 Z
11
+ date: 2018-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler