Last active
February 25, 2017 20:46
-
-
Save markd2/4b3be16abbe692bdd8b8461b80a07ac1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
#import <os/activity.h> | |
#import <os/log.h> | |
@interface ViewController () | |
@end // extension | |
static os_activity_t g_appActivity; | |
@implementation ViewController | |
+ (void) load { | |
[super load]; | |
} // load | |
- (void) viewDidLoad { | |
[super viewDidLoad]; | |
// Tried putting these in +load too | |
g_appActivity = os_activity_create("appActivity", | |
OS_ACTIVITY_CURRENT, | |
OS_ACTIVITY_FLAG_DEFAULT); | |
assert(g_appActivity); | |
} // viewDidLoad | |
- (void) ook { | |
os_log(OS_LOG_DEFAULT, "I fall upon the thorns of life! I skin my knees!"); | |
os_activity_label_useraction("knees"); | |
os_trace("knees1"); | |
NSLog(@"BORK"); | |
assert(!"die"); | |
} // ook | |
- (IBAction) thing1 { | |
os_activity_scope(g_appActivity); | |
os_activity_label_useraction("verb"); | |
os_trace("verb1"); | |
os_log(OS_LOG_DEFAULT, "I seem to be a verb"); | |
} // thing1 | |
- (IBAction) thing2 { | |
os_activity_scope(g_appActivity); | |
os_activity_label_useraction("pez"); | |
os_trace("pez1"); | |
os_log(OS_LOG_DEFAULT, "I smell like Pez"); | |
[self ook]; | |
} // thing2 | |
@end // ViewController | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment