cd ~

Track code history with Qi

qi prints git revision hashes at the end of fixed time intervals. This enables running an analysis at, say, the end of every week over the past two quarters to check if a team decision in January is having an intended effect in June.

For a toy example, running qi --every year --past "12 years" --command "du -sh ." on the Linux source shows annual disk usage growth, starting from the time on HEAD.

[sage linux]$ qi -e year -p "12 years" -c "du -sh ."
2.8G . # 2017 (to date)
2.7G . # 2016
2.6G . # 2015
2.6G . # 2014
2.5G . # 2013
2.5G . # 2012
2.4G . # 2011
2.4G . # 2010
2.4G . # 2009
2.3G . # 2008
2.2G . # 2007
2.2G . # 2006
2.2G . # 2005

For a different example, running qi --every month --past "3 years" --command "./analyze.sh" in the React source with the below script will generate monthly complexity reports.

#!/bin/bash
TIME=$(git show -s --format=%ct HEAD)

# Using https://www.npmjs.com/package/complexity-report
cr -e -f json ./src > $(git show -s --format=%ct HEAD).json

I wrote qi in a shop producing hundreds of commits daily, discovering that the team was, on average, creating seven production code files for every one test suite and leaving roughly 20% of our JS and CSS unused. Data like this catches attention and can sway discussions in favor of your proposals.