net-daemon / netdaemon

An application daemon for Home Assistant written in .NET
MIT License
220 stars 63 forks source link

Adding performance tests #1145

Open helto4real opened 2 months ago

helto4real commented 2 months ago

Breaking change

Proposed change

This PR adds simple performance tests for NetDaemon. For now it is not able to run as part of the CI/CD pipeline but can be run locally. This is something that will be added in the future.

It adds a performance test server that fakes HA and a NetDaemon client project that contains apps that meassure and logs performance.

The PR also adds a small fix to HomeAssistantConnection that I found when writing the performance tests.

Type of change

Additional information

Checklist

If user exposed functionality or configuration are added/changed:

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82%. Comparing base (f0480a1) to head (0edcb36).

Files Patch % Lines
...mon.HassClient/Internal/HomeAssistantConnection.cs 66% 1 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1145 +/- ## ==================================== - Coverage 82% 82% -1% ==================================== Files 190 190 Lines 3779 3784 +5 Branches 425 426 +1 ==================================== + Hits 3113 3116 +3 - Misses 501 502 +1 - Partials 165 166 +1 ``` | [Flag](https://app.codecov.io/gh/net-daemon/netdaemon/pull/1145/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=net-daemon) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/net-daemon/netdaemon/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=net-daemon) | `82% <66%> (-1%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=net-daemon#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.