xcprofiler 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/.coveralls.yml +1 -1
- data/README.md +25 -25
- data/assets/sample_output.png +0 -0
- data/lib/xcprofiler/profiler.rb +2 -2
- data/lib/xcprofiler/reporters/abstract_reporter.rb +2 -2
- data/lib/xcprofiler/reporters/json_reporter.rb +1 -1
- data/lib/xcprofiler/reporters/standard_output_reporter.rb +4 -3
- data/lib/xcprofiler/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: 52fc6ad175d3fd755e9b336163380845cd1639ac
|
4
|
+
data.tar.gz: da3a6a35c961ce75a65790127f695f48d627edc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83f5273191750496817ebd2a71e864ace68be969e7de47a2e6baed9b5fcbc826079e9becfad4997427140178b191333c0affcf3828912986c7005eaabc5203d2
|
7
|
+
data.tar.gz: 7c2654c59164c7787b65b5c2d82d96766c59de68fb2e4838002a63edd94201cd8107062a232e5fbc4ea00ec4f84e547b615a371e07237872846856b7db08a7a5
|
data/.coveralls.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
service_name: travis-ci
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Command line utility to profile compilation time of Swift project.
|
|
8
8
|
|
9
9
|

|
10
10
|
|
11
|
-
This tool developed in working time for Cookpad.
|
11
|
+
This tool is developed in working time for Cookpad.
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
@@ -40,30 +40,30 @@ $ xcprofiler ~/Library/Developer/Xcode/DerivedData/MyApp-xxxxxxxxxxx/Logs/Build/
|
|
40
40
|
Sample output is here
|
41
41
|
|
42
42
|
```
|
43
|
-
|
44
|
-
| File
|
45
|
-
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
43
|
+
+----------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
44
|
+
| File | Line | Method name | Time(ms) |
|
45
|
+
+----------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
46
|
+
| ResultProtocol.swift | 132 | public func ==<T : ResultProtocol where T.Value : Equatable, T.Error : Equatable>(left: T, right: T) -> Bool | 14.2 |
|
47
|
+
| Result.swift | 66 | get {} | 13.1 |
|
48
|
+
| Result.swift | 78 | public static func error(_ message: String? = default, function: String = #function, file: String = #file, line: Int = #line) -> NSError | 6.3 |
|
49
|
+
| Result.swift | 69 | get {} | 2.2 |
|
50
|
+
| Result.swift | 132 | public func `try`<T>(_ function: String = #function, file: String = #file, line: Int = #line, try: (NSErrorPointer) -> T?) -> Result<T, NSError> | 1.7 |
|
51
|
+
| Result.swift | 95 | get {} | 1.4 |
|
52
|
+
| Result.swift | 21 | public init(_ value: T?, failWith: @autoclosure () -> Error) | 0.9 |
|
53
|
+
| Result.swift | 142 | public func `try`(_ function: String = #function, file: String = #file, line: Int = #line, try: (NSErrorPointer) -> Bool) -> Result<(), NSError> | 0.9 |
|
54
|
+
| ResultProtocol.swift | 172 | @available(*, unavailable, renamed: "recover(with:)") public func recoverWith(_ result: @autoclosure () -> Self) -> Self | 0.7 |
|
55
|
+
| Result.swift | 72 | get {} | 0.6 |
|
56
|
+
| Result.swift | 75 | get {} | 0.6 |
|
57
|
+
| ResultProtocol.swift | 72 | public func recover(_ value: @autoclosure () -> Value) -> Value | 0.5 |
|
58
|
+
| ResultProtocol.swift | 111 | public func &&&<L : ResultProtocol, R : ResultProtocol where L.Error == R.Error>(left: L, right: @autoclosure () -> R) -> Result<(L.Value, R.Value), L.Error> | 0.5 |
|
59
|
+
| ResultProtocol.swift | 144 | public func !=<T : ResultProtocol where T.Value : Equatable, T.Error : Equatable>(left: T, right: T) -> Bool | 0.5 |
|
60
|
+
| ResultProtocol.swift | 92 | public func tryMap<U>(_ transform: (Value) throws -> U) -> Result<U, Error> | 0.4 |
|
61
|
+
| Result.swift | 175 | @available(*, unavailable, renamed: "success") public static func Success(_: T) -> Result<T, Error> | 0.3 |
|
62
|
+
| ResultProtocol.swift | 55 | public func mapError<Error2>(_ transform: (Error) -> Error2) -> Result<Value, Error2> | 0.3 |
|
63
|
+
| ResultProtocol.swift | 77 | public func recover(with result: @autoclosure () -> Self) -> Self | 0.3 |
|
64
|
+
| ResultProtocol.swift | 93 | (closure) | 0.3 |
|
65
|
+
| Result.swift | 31 | public init(attempt f: () throws -> T) | 0.2 |
|
66
|
+
+----------------------+------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
67
67
|
```
|
68
68
|
|
69
69
|
### Available Options
|
data/assets/sample_output.png
CHANGED
Binary file
|
data/lib/xcprofiler/profiler.rb
CHANGED
@@ -10,8 +10,6 @@ module Xcprofiler
|
|
10
10
|
raise NotImplementedError, 'Not implemented'
|
11
11
|
end
|
12
12
|
|
13
|
-
protected
|
14
|
-
|
15
13
|
def filter_executions(executions)
|
16
14
|
executions = sort_executions(executions, order)
|
17
15
|
executions = executions.delete_if(&:invalid?) unless show_invalid_locations?
|
@@ -19,6 +17,8 @@ module Xcprofiler
|
|
19
17
|
executions
|
20
18
|
end
|
21
19
|
|
20
|
+
protected
|
21
|
+
|
22
22
|
def sort_executions(executions, order)
|
23
23
|
case order
|
24
24
|
when :default
|
@@ -3,7 +3,7 @@ require 'json'
|
|
3
3
|
module Xcprofiler
|
4
4
|
class JSONReporter < AbstractReporter
|
5
5
|
def report!(executions)
|
6
|
-
json =
|
6
|
+
json = executions.map(&:to_h)
|
7
7
|
unless output_path
|
8
8
|
raise OutputPathIsNotSpecified, '[JSONReporter] output_path is not specified'
|
9
9
|
end
|
@@ -3,16 +3,17 @@ require 'terminal-table'
|
|
3
3
|
module Xcprofiler
|
4
4
|
class StandardOutputReporter < AbstractReporter
|
5
5
|
def report!(executions)
|
6
|
-
|
7
|
-
puts table_for(filtered)
|
6
|
+
puts table_for(executions)
|
8
7
|
end
|
9
8
|
|
9
|
+
private
|
10
|
+
|
10
11
|
def table_for(executions)
|
11
12
|
Terminal::Table.new do |t|
|
12
13
|
t << ['File', 'Line', 'Method name', 'Time(ms)']
|
13
14
|
t << :separator
|
14
15
|
executions.each do |execution|
|
15
|
-
t << [execution.
|
16
|
+
t << [execution.filename, execution.line, execution.method_name, execution.time]
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
data/lib/xcprofiler/version.rb
CHANGED
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- giginet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|