release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Wiki > Main > PluginBatteryBenchmark (compare)

Difference: PluginBatteryBenchmark (r28 vs. r27)

Battery Benchmark

Keys

PlayerRecorderOndioiRiveriPodFunction
On On Right Play Play Load Plugin
Stop Off OnOff Stop Menu Quit Plugin
Any other It is a TSR plugin, see Details

Details

The Battery Benchmark Plug-in enables you to test your battery's performance, while making normal use of your audio player. Once loaded it will run in the background (TSR plugin), reading various info about your battery while you use it. Once you finish your session you can find the benchmark output data in a file on your player (/battery_bench.txt).

Make sure to report you findings and logs at the BatteryRuntime page.

How it works

After you load the plugin the operation of your player continues as normal. You can now do whatever you could do before loading the plugin (play music, listen to radio, charge (while turned on), idle, transfer files) except load another plugin. If you happen to load a plugin while benchmarking, a splash screen will inform you about the termination of the Benchmark. Every 60 seconds, a measurement of various battery related information is logged to a buffer in memory. This buffer is flushed to the log file when the disk is activated by external causes (buffer refill, open folder, USB mode), when the log file is full (should be very rare because the buffer can hold 1000 measurements), or when the plugin is exited.

The plugin will continue to log info on the file until:

  • Load another plug-in.
  • Shut-down the player.
  • There is no more battery.

Benchmarks can be resumed if you accidentally load a plugin, or turn off your player, as long as the log file (/battery_bench.txt) is not deleted.

Information explained

On the top of the file you will see various info on how to use the plugin.

Time: It is the total time of operation of the player. It is not the time that you started the plug-in. If you have your player on for 5 minutes and then you start, the plugin will start measuring from 5 minutes.

Seconds: As time, it shows time passed in seconds. Nothing special, it is there because it is free and maybe someone might want to do weird graphs with seconds.

Level: The percent level of the battery estimated by rockbox. This is an estimation and not an accurate result. Using the real percentage (current battery voltage / top battery voltage) * 100) we can calculate the difference between the estimation. Goal of this column is to make the estimation algorithm of Rockbox more accurate.

Time Left: It shows the estimated (by Rockbox) remaining time until shutdown. Again, as Level, this column can be used to see differences between real time left and estimated time left. This could help make time left more accurate.

Voltage: The current, battery voltage, the moment the measurement was captured. Measurements are captured when this number changes while benchmarking. This column can be used to give quite interesting graphs in a spreadsheet program. (Excel, Calc, e.t.c)

C: Stands for Charger. An "A" in that column shows if there was the power adapter attached to the unit, at the time of the measurement.

S: The "S" column shows the state of the device (Charging, or not). The "C" indicated that the unit was charging when the measurement was captured.

U: USB powered. Only for targets that support this. A "U" will indicate if the unit was using the USB port for powering.

Making graphs

While you can tell how long your battery lasted, with a single look at the last line of the battery log (/battery_bench.txt), the most useful purpose of Battery Benchmark is to make graphs using a spreadsheet program like Excel or Calc.

The battery log (battery_bench.txt) is in CSV format (comma separated) so you can quite easily import it to a spreadsheet program. You can either make your own graphs, or use the sample located in this page (not available yet).


CategoryPlugin: Battery Benchmark [PlayerDONE, RecorderDONE, OndioDONE, H100DONE, H300DONE, H10DONE, iPod 1G2GDONE, iPod 4GDONE, iPod ColorDONE, iPod MiniDONE, iPod NanoDONE, iPod VideoDONE, iAudio M5DONE, iAudio X5DONE, GigabeatDONE, Sansa e200DONE, Sansa c200DONE, MR-100DONE, Vibe 500DONE]

r29 - 14 Sep 2010 - 10:31:23 - MichaelStummvoll

Revision r28 - 17 May 2010 - 02:40 - JustinHannigan
Revision r27 - 16 May 2010 - 19:31 - JustinHannigan
Copyright by the contributing authors.