|
Ran
|
Jobs
5
|
Files
272
|
Run time
18min
|
Badge
README BADGES
|
push
travis-ci
<a href="https://github.com/home-assistant/home-assistant/commit/<a class=hub.com/home-assistant/home-assistant/commit/438edc5ca115a3a02bbc3887bdaafaf8ab24eb8e">438edc5ca<a href="https://github.com/home-assistant/home-assistant/commit/438edc5ca115a3a02bbc3887bdaafaf8ab24eb8e">">History performance improvements for single-entity requests (#8632) * Bugfix: remove superfluous domain filter This filter is already applied later in the function by the `filters` object, where it is conditionally applied when appropriate. This fixes the problem where we get a domain filter even when searching for a single entity_id, which needlessly harms the query&#39;s performance. * Performance: build different query when only getting single entity When querying the history of a single entity, we can use an entirely different method for the &quot;synthetic zero data point&quot; by simply sorting by date and doing a LIMIT 1. This performs thousands of times better than the multi-entity query when the current recorder_run has been going for a while. * Add entity_id filter to single-entity request The entity_id filter was handled inside the `filters.apply` logic which is used in most cases, BUT didn&#39;t work when no `filters` was passed in to the method. Now it&#39;ll work even if no `filters` object is passed in. * Fix linting errors in history.py * Undo removal of domain filter Putting back the domain filter that was removed in </a><a class="double-link" href="https://github.com/home-assistant/home-assistant/commit/<a class="double-link" href="https://github.com/home-assistant/home-assistant/commit/76a6371705dcd57483e55dcc03435ae867c184d2">76a637170</a>">76a637170</a><a href="https://github.com/home-assistant/home-assistant/commit/438edc5ca115a3a02bbc3887bdaafaf8ab24eb8e"> - there are use-cases where get_states is called without a filter object, so we need the domain filter to work in those cases as well. * Fix truncated comment
23256 of 24839 relevant lines covered (93.63%)
2.81 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 27217.1 (TOXENV=lint) | 0 | Travis Job 27217.1 | ||
| 2 | 27217.2 (TOXENV=py34) | 0 |
93.61 |
Travis Job 27217.2 | |
| 3 | 27217.3 (TOXENV=py35) | 0 |
93.61 |
Travis Job 27217.3 | |
| 4 | 27217.4 (TOXENV=py36) | 0 |
93.6 |
Travis Job 27217.4 | |
| 5 | 27217.5 (TOXENV=requirements) | 0 | Travis Job 27217.5 |