I'd like to do some crunching on the amount of time that projects build, the number of times each project builds in a day, etc.
Is there a way to export the stats associated with all the builds on a given build agent? All build agents? Etc.?
Thanks -- Jon
Unfortunately CSV export is not supported at the moment, you can watch/vote for this issue: http://www.jetbrains.net/tracker/issue2/TW-5090
Statistics can be exported with help of SQL requests right from the database. There are two main tables which can be used:
- history - contains all builds history
- light_history - to this table records from history are moved during cleanup, i.e. this table contains records of removed builds
Well, it would be much simpler if you use external database like MySQL.
HSQLDB (default db in TeamCity) usually is running in in-process mode, unfortunately no one except TeamCity can connect to the database in this mode. However it is possible to reconfigure it to run in server mode, in this case TeamCity will communicate with database via socket, and you will be able to connet to the database with help of sql tool, read more about it here: http://hsqldb.org/web/hsqlDocsFrame.html
However I would consider migration to external database, simply because it is much easier to run SQL statements with, for example, MySQL then with HSQLDB (there are various SQL tools with nice GUI for MySQL or Oracle). Also even if you configure HSQLDB to run in server mode you will need to write some scripts to shutdown or start it and so on.