Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
OOTimeProfileEntry(Private) Category Reference

Instance Methods

(id) - initWithCName:
 
(void) - addSampleWithTotalTime:selfTime:
 
(NSDictionary *) - propertyListRepresentation
 

Detailed Description

Definition at line 297 of file OOJSEngineTimeManagement.m.

Method Documentation

◆ addSampleWithTotalTime:selfTime:

- (void) addSampleWithTotalTime: (OOTimeDelta) totalTime
selfTime: (OOTimeDelta) selfTime 

Extends class OOTimeProfileEntry.

Definition at line 591 of file OOJSEngineTimeManagement.m.

849 :(OOTimeDelta)totalTime selfTime:(OOTimeDelta)selfTime
850{
851 _hitCount++;
852 _totalTimeSum += totalTime;
853 _selfTimeSum += selfTime;
854 _totalTimeMax = fmax(_totalTimeMax, totalTime);
855 _selfTimeMax = fmax(_selfTimeMax, selfTime);
856}
double OOTimeDelta
Definition OOTypes.h:224

References OOTimeProfileEntry::addSampleWithTotalTime:selfTime:, EXPECT_NOT, nil, OOHighResTimeDeltaInSeconds(), OOLogOutdent(), sProfileInfo, sProfileStack, and sTracing.

Referenced by addSampleWithTotalTime:selfTime:.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initWithCName:

- (id) initWithCName: (const char *) name

Extends class OOTimeProfileEntry.

Definition at line 591 of file OOJSEngineTimeManagement.m.

786 :(const char *)name
787{
788 NSAssert(sProfiling, @"Can't create profile entries while not profiling.");
789
790 if ((self = [super init]))
791 {
792 if (name != NULL)
793 {
794 _function = [[NSString stringWithUTF8String:name] retain];
795 }
796 }
797
798 return self;
799}
static BOOL sProfiling

◆ propertyListRepresentation

- (NSDictionary *) propertyListRepresentation

Extends class OOTimeProfileEntry.

Definition at line 591 of file OOJSEngineTimeManagement.m.

993{
994 return [NSDictionary dictionaryWithObjectsAndKeys:
995 _function, @"name",
996 [NSNumber numberWithUnsignedInteger:[self hitCount]], @"hitCount",
997 [NSNumber numberWithDouble:[self totalTimeSum]], @"totalTimeSum",
998 [NSNumber numberWithDouble:[self selfTimeSum]], @"selfTimeSum",
999 [NSNumber numberWithDouble:[self totalTimeAverage]], @"totalTimeAverage",
1000 [NSNumber numberWithDouble:[self selfTimeAverage]], @"selfTimeAverage",
1001 [NSNumber numberWithDouble:[self totalTimeMax]], @"totalTimeMax",
1002 [NSNumber numberWithDouble:[self selfTimeMax]], @"selfTimeMax",
1003 [NSNumber numberWithBool:[self isJavaScriptFrame]], @"isJavaScriptFrame",
1004 nil];
1005}

The documentation for this category was generated from the following file: