User Tools

Site Tools


android-mobapps:documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
android-mobapps:documentation [2009/12/21 00:29]
tylerharter
android-mobapps:documentation [2009/12/21 00:59] (current)
tylerharter
Line 1: Line 1:
 ====== Documentation ====== ====== Documentation ======
  
-==== The Code ====+=== The Code ===
  
 In the tarball, there is a CS707Code directory. ​ Below is a description of all the contents of CS707Code. In the tarball, there is a CS707Code directory. ​ Below is a description of all the contents of CS707Code.
  
-=== AppGrader ==+== AppGrader ==
- +
-Description:​ This is our core application that grades apps and posts the results to our database. +
-Contents:+
  AppGrader.java: ​  AppGrader.java: ​
  this is the code for the Android application that collects data that can be used to grade applications.  this is the code for the Android application that collects data that can be used to grade applications.
Line 20: Line 17:
  This is an example query that calculates grades several applications during some time interval according to the metrics described in .ppt  This is an example query that calculates grades several applications during some time interval according to the metrics described in .ppt
  
-ProcessorLoadCalculator:+== ProcessorLoadCalculator ​==
  ProcessorLoadCalculator.java: ​  ProcessorLoadCalculator.java: ​
  this is the code for our program that helps us evaluate how accurate CPU grades are.  this is the code for our program that helps us evaluate how accurate CPU grades are.
Line 26: Line 23:
  this is the manifest file corresponding to ProcessorLoadCalculator.java.  this is the manifest file corresponding to ProcessorLoadCalculator.java.
  
-FormatProcessorInfo:+== FormatProcessorInfo ​==
  FormatProcessorInfo.py: ​  FormatProcessorInfo.py: ​
  this processes the the output of ProcessorLoadCalculator.java.  this processes the the output of ProcessorLoadCalculator.java.
  
-MemoryIntensiveActivity:+== MemoryIntensiveActivity ​==
  MemoryIntensiveActivity.java: ​  MemoryIntensiveActivity.java: ​
  this is the code for a program that is designed to be memory hungery. ​ The idea is that our AppGrader should give it a bad grade if it is grading well.  this is the code for a program that is designed to be memory hungery. ​ The idea is that our AppGrader should give it a bad grade if it is grading well.
Line 37: Line 34:
  
  
 +=== Compiling/​Installing AppGrader ===
 +  - Create a new project in Eclipse or via the command line with the "​android create project"​ command.
 +  - Add the ProcessorLoadCalculator.java code file.
 +  - Use AndroidManifest.xml as the manifest file.  Note that special permissions are set here (for example, to access the SDCARD).
 +  - Create the /​sdcard/​cs707 directory on the target phone
 +  - Install the service
 +  - Reboot the phone. ​ The service should run automatically in the background. ​ To make sure it is running, try running "adb shell" from the terminal your desktop/​laptop and then run "ps -x" and find com.cs707.AppGrader in the list.  The service will run in the background, updating /​sdcard/​cs707/​grades.txt. ​ The contents of this file will occasionally be posted to the server.
 +
 +
 +
 +=== Server Side ===
 +Our server is running at mysql.cs.wisc.edu,​ username=harter. ​ post.php inserts posted data into the database. ​ Post fields are imei, table, and data.  imei is the identifier for the phone, table is the name of the table in the database where the data is to be inserted, and data is a "​multiline"​ field where the first line contains the names of the columns in the table and following lines contain data to be inserted. ​ Fields within a line are separated by commas, and lines are delimited by "​@@@"​. ​ The user/​application posting data to post.php is responsible for properly formatting data (for instance, putting quotes around strings), as post.php just blindly attempts to insert the data into the specified table.
 +
 +=== Using Processor Load Calculator ===
 +
 +This application is used to evaluate how well AppGrader grades applications. ​ The idea is that if AppGrader gives a bad CPU grade to an application,​ that application should be competing with other applications for CPU usage. ​ To see that this is actually the case, the ProcessorLoadCalculator runs in the background, incrementing a counter from 1 to 30M.  If the application that was given a bad grade is running, it should be hogging the CPU, causing the counter to count slower. ​ Every time ProcessorLoadCalculator reaches 30M, it writes an entry to /​sdcard/​processorCalc.txt that indicates the number of milliseconds it took to do the count.
android-mobapps/documentation.1261376998.txt.gz · Last modified: 2009/12/21 00:29 by tylerharter