forked from ming1016/GCDFetchFeed
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ming1016#30 from erduoniba/master
bugfix: 修复方法调用链路重复的问题
- Loading branch information
Showing
9 changed files
with
187 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...etchFeed/GCDFetchFeed.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDEDidComputeMac32BitWarning</key> | ||
<true/> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// SMCallTraceDemo.h | ||
// GCDFetchFeed | ||
// | ||
// Created by denglibing on 2023/12/20. | ||
// Copyright © 2023 Starming. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface SMCallTraceDemo : NSObject | ||
|
||
+ (void)test; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
// | ||
// SMCallTraceDemo.m | ||
// GCDFetchFeed | ||
// | ||
// Created by denglibing on 2023/12/20. | ||
// Copyright © 2023 Starming. All rights reserved. | ||
// | ||
|
||
#import "SMCallTraceDemo.h" | ||
|
||
#import "SMCallTrace.h" | ||
|
||
@implementation SMCallTraceDemo | ||
|
||
+ (void)test { | ||
[SMCallTrace start]; | ||
|
||
[self test1_1]; | ||
[self test2_1]; | ||
[self test3_1]; | ||
|
||
[self test1_1]; | ||
[self test2_1]; | ||
[self test3_1]; | ||
|
||
[SMCallTrace stop]; | ||
[SMCallTrace save]; | ||
|
||
// 打印的日志如下: | ||
/* | ||
0| 39.11|+[SMCallTraceDemo test1_1] | ||
1| 13.03| +[SMCallTraceDemo test1_2] | ||
1| 14.02| +[SMCallTraceDemo test1_3] | ||
0| 69.08|+[SMCallTraceDemo test2_1] | ||
1| 23.02| +[SMCallTraceDemo test2_2] | ||
1| 24.03| +[SMCallTraceDemo test2_3] | ||
0| 99.32|+[SMCallTraceDemo test3_1] | ||
1| 33.13| +[SMCallTraceDemo test3_2] | ||
1| 34.14| +[SMCallTraceDemo test3_3] | ||
0| 39.29|+[SMCallTraceDemo test1_1] | ||
1| 13.09| +[SMCallTraceDemo test1_2] | ||
1| 14.06| +[SMCallTraceDemo test1_3] | ||
0| 68.76|+[SMCallTraceDemo test2_1] | ||
1| 23.06| +[SMCallTraceDemo test2_2] | ||
1| 24.13| +[SMCallTraceDemo test2_3] | ||
0| 99.24|+[SMCallTraceDemo test3_1] | ||
1| 33.09| +[SMCallTraceDemo test3_2] | ||
1| 34.07| +[SMCallTraceDemo test3_3] | ||
*/ | ||
} | ||
|
||
+ (void)test1_1 { | ||
usleep(11 * 1000); | ||
[self test1_2]; | ||
[self test1_3]; | ||
} | ||
|
||
+ (void)test1_2 { | ||
usleep(12 * 1000); | ||
} | ||
|
||
+ (void)test1_3 { | ||
usleep(13 * 1000); | ||
} | ||
|
||
+ (void)test2_1 { | ||
usleep(21 * 1000); | ||
[self test2_2]; | ||
[self test2_3]; | ||
} | ||
|
||
+ (void)test2_2 { | ||
usleep(22 * 1000); | ||
} | ||
|
||
+ (void)test2_3 { | ||
usleep(23 * 1000); | ||
} | ||
|
||
|
||
+ (void)test3_1 { | ||
usleep(31 * 1000); | ||
[self test3_2]; | ||
[self test3_3]; | ||
} | ||
|
||
+ (void)test3_2 { | ||
usleep(32 * 1000); | ||
} | ||
|
||
+ (void)test3_3 { | ||
usleep(33 * 1000); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters