kantox-chronoscope 0.3.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/kantox-chronoscope.gemspec +1 -1
- data/lib/kantox/chronoscope/dummy.rb +1 -0
- data/lib/kantox/chronoscope/generic.rb +12 -12
- data/lib/kantox/chronoscope/version.rb +1 -1
- data/lib/kantox/chronoscope.rb +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3ab8ddcc87ce6ee2eb0853c5ac1849a634cccd6
|
4
|
+
data.tar.gz: cae81771ec3da5f0507383ff8790ee48ed0251cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f1f8a059f16fd428572ed72ba715a6a06c285c40847ae5d7b376f92eff79bf41f50ebbe7e29eadde9c9b5cb9c35c677c48817a72ac7019efee071deaa56aaaa
|
7
|
+
data.tar.gz: 9df44833cb09f6f6b976792d12ab755f5cbe873a7ba651628689e0ac62f3c7359fbf082e69f94939713d71712ae7b42974b88d5821597494f9aa0cab90e7e0c3
|
data/kantox-chronoscope.gemspec
CHANGED
@@ -2,19 +2,19 @@ module Kantox
|
|
2
2
|
module Chronoscope
|
3
3
|
# Dummy module to be used in production-like environments.
|
4
4
|
module Generic
|
5
|
-
COLOR_VIVID = "\033[#{Kantox::Chronoscope.
|
6
|
-
COLOR_PALE = "\033[#{Kantox::Chronoscope.
|
7
|
-
COLOR_WARN = "\033[#{Kantox::Chronoscope.
|
8
|
-
LOGGER = Kantox::Chronoscope.
|
5
|
+
COLOR_VIVID = "\033[#{Kantox::Chronoscope.kungfuig.colors!.vivid || '01;38;05;226'}m".freeze
|
6
|
+
COLOR_PALE = "\033[#{Kantox::Chronoscope.kungfuig.colors!.pale || '01;38;05;178'}m".freeze
|
7
|
+
COLOR_WARN = "\033[#{Kantox::Chronoscope.kungfuig.colors!.warn || '01;38;05;173'}m".freeze
|
8
|
+
LOGGER = Kantox::Chronoscope.kungfuig.logger && Kernel.const_get(Kantox::Chronoscope.kungfuig.logger).new ||
|
9
9
|
Kernel.const_defined?(:Rails) && ::Rails.logger ||
|
10
10
|
Logger.new(STDOUT)
|
11
11
|
|
12
|
-
BM_DELIMITER = (Kantox::Chronoscope.
|
13
|
-
ARROW = (Kantox::Chronoscope.
|
14
|
-
METHOD_LABEL = Kantox::Chronoscope.
|
15
|
-
TIMES_LABEL = Kantox::Chronoscope.
|
16
|
-
AVERAGE_LABEL = Kantox::Chronoscope.
|
17
|
-
TOTAL_LABEL = Kantox::Chronoscope.
|
12
|
+
BM_DELIMITER = (Kantox::Chronoscope.kungfuig.i18n!.bm_delimiter || ' :: ').to_s.freeze
|
13
|
+
ARROW = (Kantox::Chronoscope.kungfuig.i18n!.arrow || ' ⇒ ').to_s.freeze
|
14
|
+
METHOD_LABEL = Kantox::Chronoscope.kungfuig.i18n!.name || 'method'.freeze
|
15
|
+
TIMES_LABEL = Kantox::Chronoscope.kungfuig.i18n!.times || 'times'.freeze
|
16
|
+
AVERAGE_LABEL = Kantox::Chronoscope.kungfuig.i18n!.average || 'average'.freeze
|
17
|
+
TOTAL_LABEL = Kantox::Chronoscope.kungfuig.i18n!.total || 'total'.freeze
|
18
18
|
|
19
19
|
COLOR_NONE = "\033[0m".freeze
|
20
20
|
DEFAULT_TAG = 'N/A'.freeze
|
@@ -47,7 +47,7 @@ module Kantox
|
|
47
47
|
@@★.shift
|
48
48
|
end
|
49
49
|
end
|
50
|
-
|
50
|
+
alias watch ⌚
|
51
51
|
|
52
52
|
# FIXME: total currently adds up all calls, including nested
|
53
53
|
# I am not sure if it is correct ot not, so leaving it for now
|
@@ -60,7 +60,7 @@ module Kantox
|
|
60
60
|
@@chronoscope_data.clear if cleanup
|
61
61
|
end
|
62
62
|
end
|
63
|
-
|
63
|
+
alias harvest ⌛
|
64
64
|
|
65
65
|
def log_bm(arg, bm)
|
66
66
|
[
|
data/lib/kantox/chronoscope.rb
CHANGED
@@ -16,8 +16,8 @@ module Kantox
|
|
16
16
|
CONFIG_LOCATION = 'config/chronoscope.yml'.freeze
|
17
17
|
|
18
18
|
include Kungfuig
|
19
|
-
|
20
|
-
|
19
|
+
kungfuig(File.join(File.expand_path('..', __FILE__), CONFIG_LOCATION)) rescue nil # FIXME: report
|
20
|
+
kungfuig(CONFIG_LOCATION) rescue nil # FIXME: report
|
21
21
|
|
22
22
|
ENV = const_defined?('Rails') && Rails.env || ENV['CHRONOSCOPE_ENV'] || DEFAULT_ENV
|
23
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kantox-chronoscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kantox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.5'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.5'
|
97
97
|
description: Allows to easy and quick profile method calls during rspec execution.
|
98
98
|
email:
|
99
99
|
- aleksei.matiushkin@kantox.com
|