Pushes Query
One other very important piece of information that can be extracted from the Scheduler Database, besides build requests and jobs, are pushes.
The information about one push is spread among 3 tables: sourcestams, sourcestamp_changes and changes.
The SQLAlchemy query fetches all pushes in a specific time frame, and allows filtering and exclusion of specific branches:
s = meta.scheduler_db_meta.tables['sourcestamps']
sch = meta.scheduler_db_meta.tables['sourcestamp_changes']
c = meta.scheduler_db_meta.tables['changes']q = select([s.c.revision, s.c.branch, c.c.author, c.c.when_timestamp],
and_(sch.c.changeid == c.c.changeid, s.c.id == sch.c.sourcestampid))
q = q.group_by(c.c.when_timestamp, s.c.branch)# 3. exlude branches – not of interest / fake
# 4. filter branches
# 5. timeframe
Query explained:
- JOIN between sourcestamps, sourcestamp_changes and changes tables. The sourcestamps table contains information about the revision, branch, author and the changes table contains information about the change’s timestamp (when_timestamp).
- GROUP BY – next we group by the change’s timestamp (multiple builds of the same push will have the same when_timestamp) and branch (one push could affect multiple branches).
- Exclude branches that are not of interest like l10n and fake branches like addontester or the ones generated by unittests or talos tests (e.g. mozilla-central-win32-debug-unittest or mozilla-central-macosx64-talos).
- Fetch only pushes of requested branches (e.g. mozilla-central, try).
- Fetch only pushes having the change’s timestamp (c.when_timestamp) in the requested time frame, specified by starttime and endtime.
See Also: Build Request Query, Wait Times Query

[...] Pushes Query [...]
Wait Times Query « Anamaria Stoica
October 15, 2010 at 4:53 am
[...] To see exactly how pushes are fetched from the Scheduler Database, and what restrictions are applied on them, see Pushes Query. [...]
Introducing the Pushes Report « Anamaria Stoica
October 16, 2010 at 9:34 am