I'm using Xcode 7. iPhone 5s simulator (iOS 9.0).
I'm trying to use XCTestCase -measureBlock:
to measure time spent on some of my functions. It turns out that even I put a very simple, or nothing in the measure block, the time of first run is always very high, like 400%-500% higher than the rest. I don't have anything in my - (void)setUp
or - (void)tearDown
.
Result of NSString -stringWithFormat:
. (See the first bar of the graph.) values: [0.000031, 0.000005, 0.000003, 0.000003, 0.000003, 0.000003, 0.000003, 0.000003, 0.000003, 0.000003]
Result of a blank block. (See the first bar of the graph.) values: [0.000007, 0.000001, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000001]
Is this a bug or something? What is going on?
Aucun commentaire:
Enregistrer un commentaire