-3

How to create code in Xcode that drain the battery the most ?. Any code, but device is being in Airplane Mode (no wifi, no gps, no blutooth,...). (Ex: create loop code, run video, create multi thread,...)

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Kent Phong
  • 35
  • 2

1 Answers1

-1

Following is link to my effort for Android (free), that might help. It runs my most demanding JavaDraw test, measuring CPU MHz and graphics FPS, as these might change as battery loses power.

http://www.roylongbottom.org.uk/android%20graphics%20benchmarks.htm#anchor6

It runs 60 passes for duration via typed input, with testing time, MHz and FPS displayed as the tests are running, then all results at the end, if it gets there. The results are also saved to the internal drive (probably not a good idea when losing power). On restarting, the last saved results are displayed.

Following are results on a Nexus 7, where power went off after nearly 4 hours (38 x 6 minutes). This identifies a problem, where the display turns off after a period (pass 17 low FPS - zero for some of the time) and needs the power button pressing to continue.

  Last Results 25-Jan-2015 09.29
 Up to 60 360 second runs, MHz 1 sample/frame
 Log File /storage/emulated/0/BatteryTest.txt

 Run    FPS   MHz   Run    FPS   MHz
   1    9.0  1209     2    9.0  1177
   3    9.0  1170     4    9.0  1174
   5    9.0  1171     6    9.0  1175
   7    9.0  1173     8    9.0  1173
   9    8.7  1183    10    8.7  1183
  11    8.7  1184    12    8.7  1186
  13    8.7  1185    14    8.7  1180
  15    8.7  1185    16    8.7  1187
  17    2.0  1167    18    8.7  1187
  19    8.7  1185    20    8.7  1181
  21    8.7  1181    22    8.7  1186
  23    8.7  1186    24    8.7  1186
  25    8.7  1187    26    8.0  1185
  27    8.7  1178    28    8.7  1187
  29    8.7  1190    30    8.7  1185
  31    8.7  1184    32    8.1  1178
  33    3.1  1180    34    8.6  1181
  35    8.7  1183    36    8.7  1185
  37    8.6  1181    38    8.5  1178
Roy Longbottom
  • 1,192
  • 1
  • 6
  • 8