xcprofiler 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/xcprofiler/profiler.rb +1 -1
- data/lib/xcprofiler/reporters/abstract_reporter.rb +5 -0
- data/lib/xcprofiler/version.rb +1 -1
- data/lib/xcprofiler.rb +2 -0
- 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: bde059146e60da92079977e347ddf9d8fc2bc600
|
4
|
+
data.tar.gz: 27d2eecfd366eed584767685fffbce1de830055e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5869a5c6ca211d2653b9e59174568ca0d6651588795fac185e6265fbf69e553be36f11260576a7209d5a3c90878ed1f255cfce46bd05e545797ecd5e6cdabc0d
|
7
|
+
data.tar.gz: 161930a3f5d13e839e11dde404c0d3acbe22df7f29a81ba14e04d2a80453c49c36c5c08de7c37e9fb5bccf23b37d4e28ef50e23f15069523e6a3b809f2068c00
|
data/README.md
CHANGED
@@ -71,6 +71,7 @@ Sample output is here
|
|
71
71
|
|option|shorthand|description|
|
72
72
|
|------|---------|-----------|
|
73
73
|
|--limit|-l|Limit for display|
|
74
|
+
|--threshold||Threshold of time to display (ms)|
|
74
75
|
|--show-invalids||Show invalid location results|
|
75
76
|
|--order|-o|Sort order (default,time,file)|
|
76
77
|
|
data/lib/xcprofiler/profiler.rb
CHANGED
@@ -34,7 +34,7 @@ module Xcprofiler
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def reporters
|
37
|
-
@reporters ||= [StandardOutputReporter.new(limit: options[:limit], order: options[:order])]
|
37
|
+
@reporters ||= [StandardOutputReporter.new(limit: options[:limit], threshold: options[:threshold], order: options[:order])]
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
@@ -14,6 +14,7 @@ module Xcprofiler
|
|
14
14
|
executions = sort_executions(executions, order)
|
15
15
|
executions = executions.delete_if(&:invalid?) unless show_invalid_locations?
|
16
16
|
executions = executions[0...limit] if limit
|
17
|
+
executions = executions.delete_if { |v| v.time < threshold } if threshold
|
17
18
|
executions
|
18
19
|
end
|
19
20
|
|
@@ -34,6 +35,10 @@ module Xcprofiler
|
|
34
35
|
options[:limit]
|
35
36
|
end
|
36
37
|
|
38
|
+
def threshold
|
39
|
+
options[:threshold]
|
40
|
+
end
|
41
|
+
|
37
42
|
def show_invalid_locations?
|
38
43
|
options[:show_invalid_locations] || false
|
39
44
|
end
|
data/lib/xcprofiler/version.rb
CHANGED
data/lib/xcprofiler.rb
CHANGED
@@ -23,6 +23,7 @@ module Xcprofiler
|
|
23
23
|
opts.on("--[no-]show-invalids", "Show invalid location results") { |v| options.show_invalid_locations = v }
|
24
24
|
opts.on("-o [ORDER]", [:default, :time, :file], "Sort order") { |v| options.order = v }
|
25
25
|
opts.on("-l", "--limit [LIMIT]", Integer, "Limit for display") { |v| options.limit = v }
|
26
|
+
opts.on("--threshold [THRESHOLD]", Integer, "Threshold of time to display(ms)") { |v| options.threshold = v }
|
26
27
|
opts.on_tail("-h", "--help", "Show this message") do
|
27
28
|
puts opts
|
28
29
|
exit
|
@@ -46,6 +47,7 @@ module Xcprofiler
|
|
46
47
|
end
|
47
48
|
profiler.reporters = [
|
48
49
|
StandardOutputReporter.new(limit: options[:limit],
|
50
|
+
threshold: options[:threshold],
|
49
51
|
order: order,
|
50
52
|
show_invalid_locations: options[:show_invalid_locations])
|
51
53
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcprofiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- giginet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|