{"id":15381418,"url":"https://github.com/xcoder1011/skapmtools","last_synced_at":"2025-10-11T10:47:58.675Z","repository":{"id":64762900,"uuid":"556576142","full_name":"Xcoder1011/SKApmTools","owner":"Xcoder1011","description":"APM性能优化相关（swift版本 ）：ANR卡顿监测、网络优化、内存监控、启动优化、常见crash防护、crash监控上报","archived":false,"fork":false,"pushed_at":"2025-08-11T07:11:50.000Z","size":355,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-29T17:10:29.143Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xcoder1011.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-24T05:32:30.000Z","updated_at":"2025-08-11T07:11:53.000Z","dependencies_parsed_at":"2025-10-11T10:47:58.539Z","dependency_job_id":null,"html_url":"https://github.com/Xcoder1011/SKApmTools","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Xcoder1011/SKApmTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcoder1011%2FSKApmTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcoder1011%2FSKApmTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcoder1011%2FSKApmTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcoder1011%2FSKApmTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xcoder1011","download_url":"https://codeload.github.com/Xcoder1011/SKApmTools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcoder1011%2FSKApmTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006867,"owners_count":26084208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T14:27:13.293Z","updated_at":"2025-10-11T10:47:58.652Z","avatar_url":"https://github.com/Xcoder1011.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SKApmTools\n\nAPM性能优化相关（swift版本 ）：ANR卡顿监测、网络优化、内存监控、启动优化、常见crash防护、crash监控上报\n\n## Usage\n\n### 1.卡顿监测\n\n开启卡顿监测\n\n```swift\n// 1.开启卡顿监测\nSKANRMonitor.start()\nSKANRMonitor.monitorCallback { curEntity, allEntities in\n    print(\"监测到卡顿: \\(curEntity.validFunction)\")\n    print(curEntity.threadId)\n    print(curEntity.occurenceTime)\n    print(curEntity.validAddress)\n    print(curEntity.traceContent)\n}\n```\n\n控制台打印卡顿信息\n\n```swift\n\n监测到卡顿: SKApmTools_Example.ViewController.btnClicked(__C.UIButton) -\u003e ()\n259\n692678740.80218\n0x000000010621ccce\n0   Foundation                          0x00007ff800c7db5d  +[NSThread sleepForTimeInterval:] + 163 \n1   SKApmTools_Example                  0x000000010621ccce  SKApmTools_Example.ViewController.btnClicked(__C.UIButton) -\u003e () + 654 \n2   SKApmTools_Example                  0x000000010621cd55  @objc SKApmTools_Example.ViewController.btnClicked(__C.UIButton) -\u003e () + 53 \n3   UIKitCore                           0x0000000107b9cd05  -[UIApplication sendAction:to:from:forEvent:] + 95 \n4   UIKitCore                           0x00000001072fec74  -[UIControl sendAction:to:forEvent:] + 110 \n5   UIKitCore                           0x00000001072ff078  -[UIControl _sendActionsForEvents:withEvent:] + 345 \n6   UIKitCore                           0x00000001072fb203  -[UIButton _sendActionsForEvents:withEvent:] + 148 \n7   UIKitCore                           0x00000001072fd8cf  -[UIControl touchesEnded:withEvent:] + 485 \n8   UIKitCore                           0x0000000107be1e95  -[UIWindow _sendTouchesForEvent:] + 1292 \n9   UIKitCore                           0x0000000107be3ef1  -[UIWindow sendEvent:] + 5304 \n10  UIKitCore                           0x0000000107bb77f2  -[UIApplication sendEvent:] + 898 \n11  UIKitCore                           0x0000000107c5ee61  __dispatchPreprocessedEventFromEventQueue + 9381 \n12  UIKitCore                           0x0000000107c61569  __processEventQueue + 8334 \n13  UIKitCore                           0x0000000107c578a1  __eventFetcherSourceCallback + 272 \n14  CoreFoundation                      0x00007ff800387035  __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 \n15  CoreFoundation                      0x00007ff800386f74  __CFRunLoopDoSource0 + 157 \n16  CoreFoundation                      0x00007ff800386771  __CFRunLoopDoSources0 + 212 \n17  CoreFoundation                      0x00007ff800380e73  __CFRunLoopRun + 927 \n18  CoreFoundation                      0x00007ff8003806f7  CFRunLoopRunSpecific + 560 \n19  GraphicsServices                    0x00007ff809c5c28a  GSEventRunModal + 139 \n20  UIKitCore                           0x0000000107b9662b  -[UIApplication _run] + 994 \n21  UIKitCore                           0x0000000107b9b547  UIApplicationMain + 123 \n22  SKApmTools_Example                  0x000000010621e2df  main + 63 \n23  dyld                                0x00000001063e32bf  start_sim + 10 \n24  ???                                 0x0000000112c83310  0x0 + 4610077456 \n```\n\n### 2.图片尺寸检测\n\n开启图片尺寸检测\n\n```swift\n SKImageMonitor.start()\n```\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n## Installation\n\nSKApmTools is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SKApmTools'\n```\n\n## Author\n\nXcoder1011, shangkunwu@msn.com\n\n## License\n\nSKApmTools is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcoder1011%2Fskapmtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcoder1011%2Fskapmtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcoder1011%2Fskapmtools/lists"}