A new feature in Android 8.1 Developer Preview, which is a test-bed for all the new functionalities that will most certainly make it to stock Android down the line, is a built-in wakelock detector that will potentially save you a lot of battery by identifying and highlighting apps that have prevented the phone from going into deep sleep.
The feature will pinpoint culprit apps that are causing too many wakelocks and are essentially draining your battery by preventing the device from going into deep sleep mode. Aside from telling you which apps are doing that, the feature will also state the exact reason why the app has been using tons of juice: for example, location-based apps could be polling for your location too often, thus going through your battery real fast, or apps preventing the device from going to sleep.
This wakelock detector can be found in the battery info menu in Settings, where any wrongdoing apps will be easily-identifiable by a red battery warning sign. Tapping on the wrongdoing app will often allow you to take action by either force-closing it or disabling the accompanying service in use, like GPS-assisted location polling, etc.
At the moment, almost all Android users can use different third-party appps to detect wakelocks and wrongdoing apps, but it's nice to see stock Android scoring such a functionality. Let's only hope that it really makes it to some future version of the operating system.