[autotest] Sneak stats calls in to log queued and running HQEs.

This isn't the most well designed stats logging, but it should get the
right numbers logged at some point in time during the tick.

BUG=None
DEPLOY=scheduler
TEST=ran locally

Change-Id: I7e60f20d88462f077e9469c0cf9cbbb7d8ed11f9
Reviewed-on: https://chromium-review.googlesource.com/177949
Tested-by: Alex Miller <milleral@chromium.org>
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
diff --git a/scheduler/monitor_db.py b/scheduler/monitor_db.py
index 83d11f4..1c9538a 100755
--- a/scheduler/monitor_db.py
+++ b/scheduler/monitor_db.py
@@ -460,6 +460,8 @@
         status_list = ','.join("'%s'" % status for status in statuses)
         queue_entries = scheduler_models.HostQueueEntry.fetch(
                 where='status IN (%s)' % status_list)
+        stats.Gauge('scheduler.jobs_per_tick').send(
+                'running', len(queue_entries))
 
         agent_tasks = []
         used_queue_entries = set()
@@ -829,8 +831,6 @@
         scheduled for execution on the drone through _handle_agents.
         """
         queue_entries = self._refresh_pending_queue_entries()
-        if not queue_entries:
-            return
 
         new_hostless_jobs = 0
         new_atomic_groups = 0