TSNPerf 1.1

TSNPerf 1.1

测试已测试
语言语言 Obj-CObjective C
许可协议 MIT
发布日期最新发布2015年3月

Brian Lambert 维护。



  • 作者
  • Brian Lambert

TSNPerf 是一个高分辨率性能测量实用程序类。

使用 TSNPerf

简单地将 TSNPerf 添加到您的 Podfile 中。

pod 'TSNPerf'

并使用以下命令进行安装

pod install

使用示例

捕捉单个操作的性能

// Allocate and initialize TSNPerf.
TSNPerf * perf = [[TSNPerf alloc] init];

// Start performance measurement.
[perf start];

// Perform operation(s) to be measured.

// Capture performance measurement.
[perf capture];

// Display performance.
NSLog(@"The operation took %@", [perf stringWithElapsedTime]);

捕捉多个操作的性能

// Allocate and initialize TSNPerf.
TSNPerf * perf = [[TSNPerf alloc] init];

// Start performance measurement of operation A.
[perf start];

// Perform operation A to be measured.

// Capture performance measurement of operaiton A.
[perf capture];

// Display performance of operation A.
NSLog(@"Operation A took %@", [perf stringWithElapsedTime]);

// Start performance measurement of operation B.
[perf start];

// Perform operation B to be measured.

// Capture performance measurement of operation B.
[perf capture];

// Display performance of operation B.
NSLog(@"Operation B took %@", [perf stringWithElapsedTime]);

许可证

TSNPerf 根据 MIT 许可协议发布,这意味着您可以自由地在封闭和开源项目中使用它。然而,即使在封闭源项目中,也请包括一个公开可访问的 TSNPerf 版权声明副本,该副本可在 LICENSE 文件中找到。

反馈

如果您对 TSNPerf 有任何问题、建议或贡献,请 联系我