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

home-assistant / home-assistant / 27217 / 2
94%
dev: 94%

Build:
DEFAULT BRANCH: dev
Ran 26 Jul 2017 03:34PM UTC
Files 272
Run time 11s
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

26 Jul 2017 03:22PM UTC coverage: 93.611% (+0.002%) from 93.609%
TOXENV=py34

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

23252 of 24839 relevant lines covered (93.61%)

0.94 hits per line

Source Files on job 27217.2 (TOXENV=py34)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 27217
  • Travis Job 27217.2
  • 438edc5c on github
  • Prev Job for TOXENV=py34 on dev (#27215.2)
  • Next Job for TOXENV=py34 on dev (#27218.2)
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