cocoapods-time-analyze 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +8 -3
- data/lib/cocoapods-time-analyze/gem_version.rb +1 -1
- data/lib/cocoapods-time-analyze/install-hook/install_hook.rb +1 -1
- data/lib/cocoapods-time-analyze/template/cocoapods_time_analyze_config.rb +7 -3
- data/spec/install_hook_spec.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc05ca8a3125b73796ca1333f0b5378b8d5cca26
|
4
|
+
data.tar.gz: 2cc1eaea1778bf0d5a75bfae4e07615eb723083b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00cc70c4a98c3bf295013fbc52e6c40a400dec7527ccf2367e6fe1f42978258e79530162c55283cce94c0ed69c230301509875afc954c26ad65baf1f7d617535
|
7
|
+
data.tar.gz: 249999b5914e5d34b102a98648b07dc5c44c5e0a3cd70045d4e30209f1c47933e592c25ee6681405ac585760c15a4d7cb614ed5d6bc35c520f58465d2df58358
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -39,14 +39,17 @@ module TimeAnalyzeConfig
|
|
39
39
|
%w[prepare resolve_dependencies generate_pods_project]
|
40
40
|
end
|
41
41
|
# do anything you want to do after pod install, for example, you can send the result to a server
|
42
|
-
#
|
42
|
+
# this method will be executed in the directory the `pod install` command called.
|
43
|
+
# @param total_time [Float] pod install total time, in second
|
43
44
|
# @param detail [Hash] analyze result in hash format, the key is the step name, value is the duration in second.
|
44
|
-
|
45
|
+
# @param installer [Pod::Installer] instance of Pod::Installer of this install process
|
46
|
+
def self.after_all(total_time, detail, installer)
|
45
47
|
# something awesome
|
46
48
|
end
|
47
49
|
end
|
48
50
|
end
|
49
51
|
```
|
52
|
+
|
50
53
|
### Build time analyze
|
51
54
|
|
52
55
|
Open Xcode, add this script to the post build action of scheme you want to analyze:
|
@@ -69,7 +72,9 @@ module TimeAnalyzeConfig
|
|
69
72
|
true
|
70
73
|
end
|
71
74
|
# do anything you want to do after build, for example, you can send the result to a server
|
72
|
-
#
|
75
|
+
# this method will be executed under Xcode derived data directory, and you can use ENV to
|
76
|
+
# fetch environment variables of xcode build
|
77
|
+
# @param total_time [Float] build total time, in second
|
73
78
|
# @param detail [Hash] analyze result in hash format
|
74
79
|
# @option opts [Integer] :binary_size The size of the binary in final .app product
|
75
80
|
# @option opts [Integer] :other_size The size of things except binary size in final .app product
|
@@ -14,7 +14,7 @@ module Pod
|
|
14
14
|
origin_install!
|
15
15
|
total_time = Time.now - install_start_time
|
16
16
|
|
17
|
-
TimeAnalyzeConfig::PodInstall.after_all(total_time, @time_log)
|
17
|
+
TimeAnalyzeConfig::PodInstall.after_all(total_time, @time_log, self)
|
18
18
|
write_summary_file(total_time) if TimeAnalyzeConfig::PodInstall.enable_local_summary
|
19
19
|
end
|
20
20
|
|
@@ -12,9 +12,11 @@ module TimeAnalyzeConfig
|
|
12
12
|
end
|
13
13
|
|
14
14
|
# do anything you want to do after pod install, for example, you can send the result to a server
|
15
|
-
#
|
15
|
+
# this method will be executed in the directory the `pod install` command called.
|
16
|
+
# @param total_time [Float] pod install total time, in second
|
16
17
|
# @param detail [Hash] analyze result in hash format, the key is the step name, value is the duration in second.
|
17
|
-
|
18
|
+
# @param installer [Pod::Installer] instance of Pod::Installer of this install process
|
19
|
+
def self.after_all(total_time, detail, installer)
|
18
20
|
# something awesome
|
19
21
|
end
|
20
22
|
end
|
@@ -27,7 +29,9 @@ module TimeAnalyzeConfig
|
|
27
29
|
end
|
28
30
|
|
29
31
|
# do anything you want to do after build, for example, you can send the result to a server
|
30
|
-
#
|
32
|
+
# this method will be executed under Xcode derived data directory, and you can use ENV to
|
33
|
+
# fetch environment variables of xcode build
|
34
|
+
# @param total_time [Float] build total time, in second
|
31
35
|
# @param detail [Hash] analyze result in hash format
|
32
36
|
# @option opts [Integer] :binary_size The size of the binary in final .app product
|
33
37
|
# @option opts [Integer] :other_size The size of things except binary size in final .app product
|
data/spec/install_hook_spec.rb
CHANGED
@@ -39,7 +39,8 @@ describe 'InstallHook' do
|
|
39
39
|
it 'call the after_all hook in config file' do
|
40
40
|
expect(TimeAnalyzeConfig::PodInstall).to have_received(:after_all).with(
|
41
41
|
be_within(0.05).of(expected_total_time),
|
42
|
-
a_approximate_hash_of(expected_detail)
|
42
|
+
a_approximate_hash_of(expected_detail),
|
43
|
+
an_instance_of(Pod::Installer)
|
43
44
|
)
|
44
45
|
end
|
45
46
|
|