How to use tools for profiling code in the block? Now I can see the total time for the Bloc, but I can not enter into the block to see where time is consumed.
As examples, in case 1:
if (completionBlock) { completionBlock(mutableManagedObjects, mutableBackingObjects); }
and case 2:
[backingContext performBlockAndWait:^{ if (backingObjectID) { backingObject = [backingContext existingObjectWithID:backingObjectID error:nil]; } else { backingObject = [NSEntityDescription insertNewObjectForEntityForName:entity.name inManagedObjectContext:backingContext]; } }]; : backingContext]; [backingContext performBlockAndWait:^{ if (backingObjectID) { backingObject = [backingContext existingObjectWithID:backingObjectID error:nil]; } else { backingObject = [NSEntityDescription insertNewObjectForEntityForName:entity.name inManagedObjectContext:backingContext]; } }];
In case 1, I can not be profiled within the function and see the time spent; it just shows the total time for the block. In case 2, as I only get the% of the total block; it does not show the details for the code strings inside.
source share