• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

home-assistant / home-assistant / 27217
94%

Build:
DEFAULT BRANCH: dev
Ran 26 Jul 2017 03:24PM UTC
Jobs 5
Files 272
Run time 18min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
27217

push

travis-ci

armills
<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">&quot;&gt;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&amp;#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 &amp;quot;synthetic zero data point&amp;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&amp;#39;t work when no `filters` was passed in to the method. Now it&amp;#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

Jobs
ID Job ID Ran Files Coverage
1 27217.1 (TOXENV=lint) 26 Jul 2017 03:42PM UTC 0
Travis Job 27217.1
2 27217.2 (TOXENV=py34) 26 Jul 2017 03:34PM UTC 0
93.61
Travis Job 27217.2
3 27217.3 (TOXENV=py35) 26 Jul 2017 03:33PM UTC 0
93.61
Travis Job 27217.3
4 27217.4 (TOXENV=py36) 26 Jul 2017 03:34PM UTC 0
93.6
Travis Job 27217.4
5 27217.5 (TOXENV=requirements) 26 Jul 2017 03:24PM UTC 0
Travis Job 27217.5
Source Files on build 27217
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #27217
  • 438edc5c on github
  • Prev Build on dev (#27215)
  • Next Build on dev (#27218)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc