Skip to content
Stress tests for the Raspberry Pi
Python Makefile
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 33 commits behind nschloe:master.
shortbloke Merge change from PR Review (#11)
* Add support for varrying the number of CPU cores being stressed. Defauly will be ALL, prevously was fixed at 4

* Remove f string formatting, to maintain Python 3.0 support

* Idle durations configurable (#3)

* Add ability to adjust idle time. Make stress duration more specific (#2)

* Don't wrap simple call for cpu core count

* remove :

* add gh-actions config

* gh-actions fix

* Trigger tests

* Apply black fixes

* Fix merge issues

* Address PR feedback:
* Use vcgencmd as default for for temperature and frequency measurement. Able to be overriden by passing file source as argument.
* Remove default file locations for frequency and temp. User would need to know and specify this now.
* If vcgencmd is not found, will now throw an exception not fall back to default file method.
* Always measure frequency.
* Format printing of temperature and frequency measurements.
* Simplication of setting a solid background colour for plot.

* Fix test failures:
* Change measure_core_frequency to return a float. Print messages used to format to zero decimal places.
* Update test to provide frequency file. As frequency is recorded by default.

* black fix

* Increase code coverage by covering plot of frequency.

* make cooldown poll interval configurable (to speed up unit test)

* Add additional tests. Improve code coverage.

* rename transparent plot argument to make it more logical

* Remove test which would call vcgencmd as this needs to be mocked.
Package isn't available to be installed on circleci test system.

* black fixes

* provide example file locations in help text for temperature and frequency
Latest commit e86cc0f Sep 7, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Merge change from PR Review (#11) Sep 7, 2019
stressberry Merge change from PR Review (#11) Sep 7, 2019
test Merge change from PR Review (#11) Sep 7, 2019
.flake8 add flake8 config Jun 20, 2018
.gitignore Plot line width configurable. Sep 5, 2019
LICENSE remove some python 2 compat code Jul 3, 2019
Makefile apply isort Jul 3, 2019 Merge change from PR Review (#11) Sep 7, 2019
codecov.yml initial commit Nov 16, 2017


Stress tests and temperature plots for the Raspberry Pi

CircleCI codecov Code style: black awesome PyPi Version GitHub stars

There are a million ways to cool down your Raspberry Pi: Small heat sinks, specific cases, and some extreme DIY solutions. stressberry is a package for testing the core temperature under different loads, and it produces nice plots which can easily be compared.

Raspberry Pi 4B

With fans

Thanks to @flyingferret for the measurements!

Raspberry Pi 3B+

FLIRC case

The famous FLIRC case. Thanks to @RichardKav for the measurements!

Raspberry Pi 3B

No fans, heat sinks, or case. Your average acrylic case from eBay. FastTech case, full-body aluminum alloy with heat pads for CPU and RAM.

How to

To run stressberry on your computer, simply install it with

[sudo] apt install stress
pip3 install stressberry --user

and run it with

stressberry-run out.dat
stressberry-plot out.dat -o out.png

(Use MPLBACKEND=Agg stressberry-plot out.dat -o out.png if you're running the script on the Raspberry Pi itself.)

The run lets the CPU idle for a bit, then stresses it with maximum load for 5 minutes, and lets it cool down afterwards. The entire process takes 10 minutes. The resulting data is displayed to a screen or, if specified, written to a PNG file.

If you'd like to submit your own data for display here, feel free to open an issue and include the data file, a photograph of your setup, and perhaps some further information.


To run the tests, just check out this repository and type



stressberry is published under the MIT license.

You can’t perform that action at this time.