Benchmark Application

The Benchmark application comprises multiple tests that demonstrate various RTAndroid features. At the same time it serves as a simple example of the RTAndroid API. This Benchmark allows you to test and compare the performance and capabilities of the RTAndroid platform. It provides you the possibility to execute and compare test cases with different platform configurations. The shown diagrams resulted from a test executed on a Google Nexus 10 tablet.

Test Configuration

Every benchmark consists of a number of cycles each having a calculation and sleep phase. Both parameter can be configured in the application. Finally, the real-time support levels that you want to benchmark can be selected. After running a set of tests, the Benchmark application will provide a you an overview of all core values of the calculation and sleep phase for every test case.

Calculation Phase

This tests periodically performs a computation-intensive operation and puts the executing thread to sleep. The compute-duration is measured for each iteration. As the results below indicate, RTAndroid shows a deterministic compute duration, while the computation time in standard Android is not only on average much longer, but also has a very high standard deviation. The calculation time of a test application is plotted over a period of 1000 iterations like in the last test case. But in contrast to this the calculation time of a complex computing operation was measured. The measurements plotted in light blue yield an average calculation time of 12939 µs for the test case on a default Android distribution. This contrasts with an average calculation time of 1745 µs on RTAndroid. Furthermore a much lower standard deviation of the measurements on RTAndroid can be seen. Thus the computation times are significantly more predictable.

Sleep Phase

In this test case, a thread is sleeping for a predefined period of time and the deviation between the desired and the actual sleep duration is measured. As the result below show, the actual sleep duration is quite high with large fluctuations on the stock Android platform. In contrast, RTAndroid demonstrates deterministic behavior with very low fluctuations and a low worst-case deviation. RTAndroid reduces latencies from several seconds to less than one millisecond. An illustration of response times is given in the "Latency"-diagram. Over a period of 1000 iterations the execution latency of a test application was measured in microseconds. The diagram contrasts the latencies of a non-real-time application plotted in light blue and those of a real-time application in dark blue. Analyzing both test series results in a Worst Case latency of 1255 µs for the non-real-time application and 61 µs for the same application on RTAndroid.

Source Code

The source code of the Benchmark application is available at GitHub under the terms of Apache 2.0 License.

  • Nothern Wind

    hi, i have any quetsion, how to control gpio?

  • Igor Kalkov

    We are working on it right now, I hope the new API will be included soon.
    Did you try accessing GPIO the standard Linux way (using sysfs)?

  • Nothern Wind
  • Igor Kalkov

    Yes, exactly! I just tried it and it worked nicely.

  • Nothern Wind

    Thanks for your help, everything works fine.