Absolutely, going down the road of using a custom data warehouse adapter is absolutely the method I would choose. If you want to find a TFS 2010-specific sample for a custom warehouse adapter, you can find it at the TFS SDK site.
The Visual Studio Code Metrics Power Tool that became available is one way that you can get some good information during the build process. Jakob Ehn did some work to show how to integrate the tool into a TFS 2010 build process template.The key would be how to store that particular date in a meaningful way where the data won't likely get removed (so that you can rebuild the warehouse at any time) and is portable in case the Team Project Collection database is moved to another server instance.
Ideally, what I would do is during the build process, add a build information node to the IBuildDetail
object's Information collection before the build has completed with your special information. There are a lot of different standard types of build information nodes that you can use (IBuildInformation
- see the extension methods for some ideas) but you can create your own custom type.
Whenever the data warehouse adapter runs later, it can search through the build information nodes for the IBuildDetail
(IBuildDetail.Information
)to find your special data and pump it into the custom measure that you create for the build dimension.
Let me know if you have any other questions!