Perforce Report
I’m a really competitive developer and I like to see how many files I checked in a week compared to my fellow coworkers. I know that counting then number of changed files is no way near a correct accounting of my productivity but it is an easily quantifiable metric. Perforce has an optional P4Report download that can be used create reports on the code repository. P4Report has a command-line client, P4SQL. With P4SQL you can write SQL-like statements to query the whole repository.
Download P4Report and make sure it is in your path. Once you have it in your path, start the p4sql command.
The first useful SQL statement is to find all the available tables in the system. To list all tables, you can use the following.
select * from systabs;
Perforce has a large number of database tables of which I find the following the most useful, changes, files, users, clients, fixes, and branches.
To list all the changes that you have committed you can execute a command like the following, just replace the ‘juixe’ with your own username.
select * from changes where lcase(user) = 'juixe';
I was curious and wanted to find the largest revision any single file has attained, meaning most modified file, to accomplish this I executed the following command.
select max(revision) from files;
If you use Perforce version control, you can use P4Report to query your teams check-ins and use it as an additional metric or tool in your development process.
Technorati Tags: perforce, p4, p4report, p4sql, development, process