Abstract:The software metrics involved software development project, process and prodution data definition, collection, and analysis, it is a continuous quantitative process. Tasks as updating the code from the repository, static checking, compile, package, test automation cases are automatically running by building project in continuous integration tool, during the process of building a variety of related metrics data for software metrics are provided. In combination with working practice, the principle of software metrics based on continuous integration are described; the roles involved in the management of the software metrics; the process of software metrics implemented. Described two types definition of software metrics and extraction methods based on the continuous integration. At last, several typical cases encountered in the process of software metrics is described in detail. Practice shows that in the software development process, to do a good job of software metrics helps to control, prediction, and improve the quality of the software product and software development process in software development department. Improves the efficiency of software development and software quality, reduces the cost of software development.