Re: [android-developers] ACRA clear

2011-09-25 Thread Greg Donald
On Fri, Sep 23, 2011 at 5:37 AM, bob b...@coolgroups.com wrote:
 What is the easiest way to clear out an ACRA report in Google Docs?

I found it was very difficult to use the spreadsheet method.  Too many
columns, too much scrolling.  By the time I would find the column out
to the right, I'd forgotten why I was looking there.  The stack traces
are way too tall and make vertical scrolling fairly useless even on my
largest monitor.

I ended up going the server route.  I put two tables in my database
and split the report into a crash summary with the trace, and then the
rest of the crash data goes into another table.  That way I can get a
count on same traces to fix the bigger issues first.

This is Django/Python, but you can easily adapt it to something else:

class Trace( models.Model ):
app_version_code = models.TextField( null=True, blank=True )
app_version_name = models.TextField( null=True, blank=True )
package_name = models.TextField( null=True, blank=True )
trace = models.TextField( null=True, blank=True )
count = models.IntegerField()

class Crash( models.Model ):
trace = models.ForeignKey( Trace )
phone_model = models.TextField( null=True, blank=True )
brand = models.TextField( null=True, blank=True )
product = models.TextField( null=True, blank=True )
android_version = models.TextField( null=True, blank=True )
build = models.TextField( null=True, blank=True )
total_mem_size = models.TextField( null=True, blank=True )
available_mem_size = models.TextField( null=True, blank=True )
initial_configuration = models.TextField( null=True, blank=True )
crash_configuration = models.TextField( null=True, blank=True )
display = models.TextField( null=True, blank=True )
user_comment = models.TextField( null=True, blank=True )
dumpsys_meminfo = models.TextField( null=True, blank=True )
device_features = models.TextField( null=True, blank=True )
environment = models.TextField( null=True, blank=True )
shared_preferences = models.TextField( null=True, blank=True )
settings_system = models.TextField( null=True, blank=True )
settings_secure = models.TextField( null=True, blank=True )
created = models.DateTimeField()


@csrf_exempt
def crash( request ):
status = -1
if request.method == 'POST':
t = Trace.objects.filter( trace=request.POST['STACK_TRACE'],

app_version_code=request.POST['APP_VERSION_CODE'],

app_version_name=request.POST['APP_VERSION_NAME'],

package_name=request.POST['PACKAGE_NAME'] )[:1]
try:
t = t[ 0 ]
except:
t = None
if t:
t.count += 1
else:
t = Trace( trace=request.POST['STACK_TRACE'],
   app_version_code=request.POST['APP_VERSION_CODE'],
   app_version_name=request.POST['APP_VERSION_NAME'],
   package_name=request.POST['PACKAGE_NAME'],
   count=1 )
t.save()
c = Crash( trace=t, created=datetime.now() )
c.phone_model = request.POST['PHONE_MODEL']
c.brand = request.POST['BRAND']
c.product = request.POST['PRODUCT']
c.android_version = request.POST['ANDROID_VERSION']
c.build = request.POST['BUILD']
c.total_mem_size = request.POST['TOTAL_MEM_SIZE']
c.available_mem_size = request.POST['AVAILABLE_MEM_SIZE']
c.initial_configuration = request.POST['INITIAL_CONFIGURATION']
c.crash_configuration = request.POST['CRASH_CONFIGURATION']
c.display = request.POST['DISPLAY']
c.user_comment = request.POST['USER_COMMENT']
c.dumpsys_meminfo = request.POST['DUMPSYS_MEMINFO']
c.device_features = request.POST['DEVICE_FEATURES']
c.environment = request.POST['ENVIRONMENT']
c.shared_preferences = request.POST['SHARED_PREFERENCES']
c.settings_system = request.POST['SETTINGS_SYSTEM']
c.settings_secure = request.POST['SETTINGS_SECURE']
c.save()
status = 1
return render_to_response( 'm/status.html', { 'status':status } )


When I roll out a new version, I truncate my tables in sql.  Easy, no
spreadsheet sillyness.



-- 
Greg Donald

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] ACRA clear

2011-09-23 Thread bob
What is the easiest way to clear out an ACRA report in Google Docs?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en