iOS:Add PerformanceProfile

This commit is contained in:
pengfei.zhou
2021-03-29 17:53:27 +08:00
committed by osborn
parent 51719d3fc7
commit a40413f991
7 changed files with 174 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ + (instancetype)instance {
- (void)createContext:(DoricContext *)context script:(NSString *)script source:(NSString *)source {
context.contextId = [NSString stringWithFormat:@"%ld", (long) ++self.counter];
context.performanceProfile = [[DoricPerformanceProfile alloc] initWithName:context.contextId];
dispatch_sync(self.mapQueue, ^() {
[self.contextMapTable setObject:context forKey:context.contextId];
});