【问题标题】:How to track response time of transactions in iOS app如何在 iOS 应用程序中跟踪交易的响应时间
【发布时间】:2015-04-25 23:14:25
【问题描述】:

跟踪 iOS 应用程序的响应时间如何使用 Instrument. 也在寻找一种工具或方法来捕获 android 应用程序中关键事务的响应时间。

【问题讨论】:

    标签: android ios instruments


    【解决方案1】:

    您也可以尝试像这样使用 NSLog 记录时间:

    //log the time
    NSDate *methodStart = [NSDate date];
    
    //Do your transaction and when success execute ...
    
    NSDate *methodFinish = [NSDate date];
    NSTimeInterval executionTime = [methodFinish timeIntervalSinceDate:methodStart];
    NSLog(@"Total time = %f", executionTime);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-21
      • 2020-08-21
      • 1970-01-01
      • 2023-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多