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
| // in didFinishLaunchingWithOptions at AppDelegate.m | |
| [BugSenseController setErrorNetworkOperationsCompletionBlock:^() { | |
| NSLog(@"Application crashed with errorId: %ld with an error count since last reset: %d", [BugSenseController lastCrashId], [BugSenseController crashCount]); | |
| if ([BugSenseController crashCount] == 1) { // after every crash, customize! | |
| UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"We're sorry!" | |
| message:@"We are aware of the crashes that you have experienced lately. Would you like to tell us more about it?" | |
| delegate:self | |
| cancelButtonTitle:@"No" |
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
| -optimizationpasses 25 | |
| -dontusemixedcaseclassnames | |
| -dontskipnonpubliclibraryclasses | |
| -dontpreverify | |
| -verbose | |
| -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* | |
| -printmapping out.map | |
| -renamesourcefileattribute SourceFile | |
| -keepattributes SourceFile,LineNumberTable | |
| -keep class com.bugsense.** { *; } |
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
| private async void GoTaskUnawaitedMethod(object sender, RoutedEventArgs e) | |
| { | |
| CrashUnawaitedTaskMethod(); | |
| } | |
| private async Task CrashUnawaitedTaskMethod() | |
| { | |
| throw new Exception("Task Unawaited"); | |
| } |
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
| private async void CrashUnawaitedVoidMethod(object sender, RoutedEventArgs e) | |
| { | |
| throw new Exception("Void Unawaited"); | |
| } |
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
| init([]) -> | |
| % Start the scheduled GC job every minute. Naive! | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {ok, no_state}. | |
| handle_info({gc}, State) -> | |
| erlang:garbage_collect(self()), | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {noreply, State}. |
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
| function fetchdata() | |
| local phandle = assert(io.open('event.json', 'r')) | |
| local pdata = phandle:read('*all') | |
| phandle:close() | |
| return pdata | |
| end | |
| wrk.method = 'POST' | |
| wrk.body = fetchdata() | |
| wrk.headers['Content-Type'] = 'application/json' |
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
| init([]) -> | |
| % Start the scheduled GC job every minute. Naive! | |
| erlang:send_after(60 * 1000, self(), {gc}), | |
| {ok, no_state}. | |
| handle_info({gc}, State) -> | |
| case erlang:memory(binary) of | |
| % We use more than 500 MB of binary space | |
| Binary when Binary > 500000000 -> | |
| erlang:garbage_collect(self()) |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| bugsense_cli.py | |
| ~~~~ | |
| Sample script to upload dSYMSs and access the Read API | |
| :version: 0.1 | |
| :copyright: 2013 by bugsense.com. | |
| """ | |
| from urllib import quote |
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
| # run atos | |
| sub symbolize_frames { | |
| my ($images,$bt) = @_; | |
| # create mapping of framework => address => bt frame (adjust for slid) | |
| # and for framework => arch | |
| my %frames_to_lookup = (); | |
| my %arch_map = (); | |
| my %base_map = (); | |
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 requests | |
| import json | |
| base = 'https://www.bugsense.appspot.com' | |
| def get_all_projects(token, **kwargs): | |
| from datetime import datetime, timedelta | |
| timestamp = (datetime.utcnow() - timedelta(days=1)).replace(hour=23,minute=59,second=59) | |
| base_url = "%s/api/v1/projects.json" % (base) |