Measure your program's power consumption

🌡️ Intro For those running a datacenter, or just a simple homelab server, the arrival of summer heat means an increase in air conditioning use. On this post I asked myself how a Linux engineer can measure how much energy is the system consuming so we can start to reason about workload optimization for better power consumption patterns. 🔋 Idle power drain As a starting point, let’s measure how much power my PC is consuming when idle, doing absolutely nothing; or better: nothing useful for computation or service but just running usual, default operating system tasks....

June 30, 2024 · Andrea Manzini

Headless Testing of PySide/PyQt GUI Applications with pytest-qt

🤓 Intro Manual testing of GUI applications can become tedious and error-prone as features and complexity increase. Headless testing offers a solution by automating UI interactions without the need for a physical display. This approach allows for faster test execution, improved repeatability, and seamless integration with continuous integration and continuous delivery (CI/CD) pipelines. In this post, we’ll explore how to leverage pytest-qt, a powerful framework for headless testing of PySide/PyQt applications....

May 22, 2024 · Andrea Manzini

A trip on the rusty D-Bus

Intro 🚌 D-Bus is a message bus system and standard for inter-process communication, mostly used in Linux desktop applications. Both Qt and GLib have high-level abstractions for D-Bus communication, and many of the desktop services we rely on export D-Bus protocols. Also the omnipresent systemd can be only interfaced via D-Bus API. However, D-Bus has its shortcomings — namely a lack of documentation. In this article we’ll explore how to write our own D-Bus Service in Rust and connect it to our D-Bus client....

October 4, 2023 · Andrea Manzini

il linguaggio Lua: parte 14

segue dalla parte 13 Coroutine Come approccio alla programmazione concorrente, il linguaggio Lua non ha meccanismi interni per gestire nativamente i thread, ma si può appoggiare a ciò che offre il sistema operativo sottostante. Lua invece internamente offre il supporto alle coroutine: un programma Lua può avere diversi percorsi di esecuzione ‘parallela’ ognuno col proprio stack e variabili locali ma che condividono risorse e variabili globali con le altre coroutine....

February 15, 2019 · Andrea Manzini