Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding performance tests #1145

Closed
wants to merge 53 commits into from
Closed

Adding performance tests #1145

wants to merge 53 commits into from

Conversation

helto4real
Copy link
Collaborator

@helto4real helto4real commented Jul 16, 2024

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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • The code compiles without warnings (code quality check)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration are added/changed:

Copy link

codecov bot commented Jul 16, 2024

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 ⚠️
Additional details and impacted files
@@         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 Coverage Δ
unittests 82% <66%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

helto4real and others added 24 commits July 20, 2024 23:28
- Fixed typo in class MttEntitySubscriptionApp > MqttEntitySubscriptionApp
- Updated containing file's filename accordingly
* Improved types for generated service arguments

* fix test
Bumps YamlDotNet from 15.3.0 to 16.0.0.

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1153)

Bumps System.Configuration.ConfigurationManager from 4.4.0 to 8.0.0.

---
updated-dependencies:
- dependency-name: System.Configuration.ConfigurationManager
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… New do not throw (#1159)

use lazy to remove branching from properties
* Handle decimals in JSON response

e.g. decimal being returned for sw_version

* Add test case for parsing longs
…tate cache (#1157)

* Properly deserialize context when deserializing state in the state cache

* Update tests to pass state change events as raw JSON

* Fix missed assert

---------

Co-authored-by: Tomas Hellström <[email protected]>
Co-authored-by: Frank Bakker <[email protected]>
* add deserialization off entity conversation options

* add conversation options to HassModel

* add HassClient and HassModel test updates for conversation options

* add Options handling to HassObjectMapper

* remove unused constructor

---------

Co-authored-by: Tomas Hellström <[email protected]>
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 16.1.0 to 16.1.2.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v16.1.0...v16.1.2)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tomas Hellström <[email protected]>
Bumps [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.12.4 to 4.12.5.
- [Release notes](https://github.com/dotnet/roslynator/releases)
- [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md)
- [Commits](dotnet/roslynator@v4.12.4...v4.12.5)

---
updated-dependencies:
- dependency-name: Roslynator.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [xunit](https://github.com/xunit/xunit) from 2.9.0 to 2.9.2.
- [Commits](xunit/xunit@v2-2.9.0...v2-2.9.2)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 16.1.2 to 16.1.3.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v16.1.2...v16.1.3)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.12.5 to 4.12.6.
- [Release notes](https://github.com/dotnet/roslynator/releases)
- [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md)
- [Commits](dotnet/roslynator@v4.12.5...v4.12.6)

---
updated-dependencies:
- dependency-name: Roslynator.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
FrankBakkerNl and others added 26 commits February 4, 2025 20:29
* Have nd-codegen check for available updates

* skip prerelease versions

* fix

---------

Co-authored-by: Tomas Hellström <[email protected]>
Bumps [Testcontainers](https://github.com/testcontainers/testcontainers-dotnet) from 3.10.0 to 4.0.0.
- [Release notes](https://github.com/testcontainers/testcontainers-dotnet/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-dotnet/blob/develop/CHANGELOG.md)
- [Commits](testcontainers/testcontainers-dotnet@3.10.0...4.0.0)

---
updated-dependencies:
- dependency-name: Testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1195)

Bumps [FluentAssertions](https://github.com/fluentassertions/fluentassertions) and System.Configuration.ConfigurationManager. These dependencies needed to be updated together.

Updates `FluentAssertions` from 6.12.1 to 6.12.2
- [Release notes](https://github.com/fluentassertions/fluentassertions/releases)
- [Changelog](https://github.com/fluentassertions/fluentassertions/blob/develop/AcceptApiChanges.ps1)
- [Commits](fluentassertions/fluentassertions@6.12.1...6.12.2)

Updates `System.Configuration.ConfigurationManager` from 8.0.1 to 4.4.0

---
updated-dependencies:
- dependency-name: FluentAssertions
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: System.Configuration.ConfigurationManager
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update the docker files to .net 9 versions of the base images

* Fix README for new version and .net version

* Update .net 9 target on all projects and github actions

* Add .net 9 nugets

* Fixing all the bloody warnings that .net bits produce :)

* Fix the prerelease to v5 for both images

* Fix the release docker builds to version 5
Bumps [NuGet.Protocol](https://github.com/NuGet/NuGet.Client) from 6.11.1 to 6.12.1.
- [Release notes](https://github.com/NuGet/NuGet.Client/releases)
- [Commits](https://github.com/NuGet/NuGet.Client/commits)

---
updated-dependencies:
- dependency-name: NuGet.Protocol
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Fix the startup script in docker containers for version 5

* Add it to the correct script
* Upgrade Nugets

* Add dependencies
Bumps [Testcontainers](https://github.com/testcontainers/testcontainers-dotnet) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/testcontainers/testcontainers-dotnet/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-dotnet/blob/develop/CHANGELOG.md)
- [Commits](testcontainers/testcontainers-dotnet@4.0.0...4.1.0)

---
updated-dependencies:
- dependency-name: Testcontainers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [Microsoft.CodeAnalysis.CSharp](https://github.com/dotnet/roslyn) from 4.11.0 to 4.12.0.
- [Release notes](https://github.com/dotnet/roslyn/releases)
- [Changelog](https://github.com/dotnet/roslyn/blob/main/docs/Breaking%20API%20Changes.md)
- [Commits](https://github.com/dotnet/roslyn/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.CSharp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.12.9 to 4.12.10.
- [Release notes](https://github.com/dotnet/roslynator/releases)
- [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md)
- [Commits](dotnet/roslynator@v4.12.9...v4.12.10)

---
updated-dependencies:
- dependency-name: Roslynator.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [YamlDotNet](https://github.com/aaubry/YamlDotNet) from 16.2.1 to 16.3.0.
- [Release notes](https://github.com/aaubry/YamlDotNet/releases)
- [Commits](aaubry/YamlDotNet@v16.2.1...v16.3.0)

---
updated-dependencies:
- dependency-name: YamlDotNet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update a few GitHub actions' versions, and add dependabot to check for latest version of GitHub actions

* Update SonarScan for .NET
Bumps [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

---
updated-dependencies:
- dependency-name: coverlet.msbuild
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/commits)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@3.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [xunit](https://github.com/xunit/xunit) from 2.9.2 to 2.9.3.
- [Commits](xunit/xunit@v2-2.9.2...v2-2.9.3)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@helto4real
Copy link
Collaborator Author

fucked up the merge... Startning new pr

@helto4real helto4real closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants