DEV Community

Cover image for Electron Repo—Unpredictable Metrics, Efficient Deployments
Rajni Rethesh for Middleware

Posted on • Originally published at middlewarehq.com

Electron Repo—Unpredictable Metrics, Efficient Deployments

There's a high probability that a bunch of desktop apps you are using are built with Electron. Electron is a framework that combines Node.js, parts of Chromium, and a layer of native code. Apps like Visual Studio Code, Slack, Atom, WhatsApp, or even the installer for Microsoft's Visual Studio use it to build for Windows, macOS, and Linux. Though Electron has its own fanbase, many flock to its competitor, Tauri, for its significantly better startup times and lower memory consumption.

Having said that, with over 114k stars and 15.3k forks, and a thriving community of 1300 contributors, Electron is not going anywhere anytime soon.

As part of our 100 days 100 case studies of top Github repositories, we also toyed around the Electron repo, analyzing their dora metrics using Middleware Open-source.\
Check out how Middleware helps track a project's engineering pipeline in this live demo.

If you're excited to explore these insights further and connect with fellow engineering leaders, come join us in The Middle Out Community and subscribe to the newsletter for exclusive case studies and more!

Understanding Electron Dora Metrics: The Domino Effect

Team Electron displayed a good performance in the months of June and August with a great deployment frequency of 92 and 170 releases. This shows that the team follows an aggressive continuous deployment strategy. However, July showed a sluggish movement with only 6 deployments.

Digging a little deeper, it was found that the biggest bottlenecks in their development cycle in July were the first response time, rework time, and merge time. All three were way above the benchmark set by the 2023 State of DevOps Report. None of these even came close to meeting the standard, making these three areas the major blockers holding things up.

Let's see the numbers:

First Response Time: Back in June 2024, it took about 25.12 hours to respond. Then, it shot up to 68.17 hours in July, only to drop back down to 20.02 hours in August.

Rework Time: June's rework time was 20.23 hours, but things went wild in July, skyrocketing to a whopping 90.79 hours, before finally cooling off to 14.38 hours in August 2024.

Merge Time: In June, merge time was 35.26 hours, then it blew up to a crazy 282.73 hours, only to fall to a much better 16.53 hours in August.

And just like a domino effect, the wild fluctuations in these three metrics really threw off their cycle and lead time.

Also read: Hugging Face and DORA Metrics: Fast Code, Slow Response

Electron Engineering Pipeline: Busy Putting out fires

Delays in code reviews, along with the back-and-forth nature of iterations and corrections within pull requests (PRs), can significantly contribute to the extended first response and rework times. When code reviews lag, it creates bottlenecks, forcing developers to spend more time on revisions rather than moving forward with new tasks.

Another significant factor is the disproportionate amount of time allocated to bug fixes---around 45% of the total development cycle. This high percentage suggests that developers are spending nearly half their time putting out fires instead of focusing on innovation. As a result, critical resources that could be directed toward launching new features and enhancing performance are instead diverted to addressing bugs.

In fact, only 25% of their time is spent on performance improvements, and a mere 20% goes towards developing new features. This imbalance highlights a reactive rather than proactive approach to development, ultimately stalling progress and preventing teams from achieving their strategic goals.

Also read: Node.js Dora Metrics: Faster Deployments, Slower Merge Times

The Key Strengths They Can Cash In On

Robust CI/CD Pipelines: The repo's loaded with workflow files like build.yml, pipeline-electron-build-and-test.yml, and pipeline-segment-electron-gn-check.yml. These files basically handle testing, building, and deploying automatically, cutting down on the time developers would normally spend doing things manually. With less manual intervention, teams can push out changes faster, which helps reduce those long first response and rework times. By speeding up these processes, merge times will naturally shrink too.

Frequent Smaller Changes: Instead of dropping massive, monolithic updates that can lead to a ton of back-and-forth, the team is rolling out smaller, bite-sized changes more often. This means PRs are more focused and easier to review, like PRs #43207 and #43332 .

The result?

Fewer issues to fix, faster first responses, and quicker rework cycles. Smaller, frequent changes lead to smoother merges since you're not dealing with a mountain of code all at once.

Comprehensive Automated Testing: The workflows also have a heavy focus on automated testing, with files like pipeline-segment-electron-test.yml and test.yml keeping code quality in check.

Automated testing ensures that new code doesn't break anything major, which means fewer bugs, less rework, and shorter review times. With solid testing in place, they can catch errors early on, which means smoother sailing when it comes to merging PRs later down the line.

Also read: What Developer Productivity Metrics Should An Engineering Manager Really Track?

Leaving Thoughts: Electron Repo---Unpredictable Metrics, Efficient Deployments

Electron should really lean into their active, thriving community and strong CI/CD pipeline to push their product through that final stretch. They also need to step up their documentation game---it'll make life a lot easier for developers, helping them tackle projects with more confidence and efficiency.

If you find these learnings interesting, we'd really encourage you to give a shot at Dora metrics using Middleware Open Source. You could follow this guide to analyze your team or write to our team at productivity@middlewarehq.com with your questions and we'll be happy to generate a suggestion study for your repo --- free!

Also, If you're excited to explore these insights further and connect with fellow engineering leaders, come join us in The Middle Out Community and subscribe to the newsletter for exclusive case studies and more!

Did you know?

Electron was originally created by GitHub for their desktop app, Atom. Since then, it's grown into a framework used by huge names like Microsoft, Discord, and even Facebook!

Further Resources

Top comments (0)