Instantly share code, notes, and snippets.

@pwendell /commits.sh
Last active Aug 29, 2015

Embed
What would you like to do?
Re-creating commit activity graph
# How to re-create commit activity graphs for YARN, MapReduce, HDFS, and Spark.
# This example shows the last 60 days of activity.
git clone https://github.com/apache/hadoop-common.git
cd hadoop-common
# MapReduce (commits, inserted, deleted)
git log --since="60 days ago" --oneline --shortstat --grep MAPREDUCE | grep insertion | wc
git log --since="60 days ago" --oneline --shortstat --grep MAPREDUCE | grep insertion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
git log --since="60 days ago" --oneline --shortstat --grep MAPREDUCE | grep deletion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
# HDFS (commits, inserted, deleted)
git log --since="60 days ago" --oneline --shortstat --grep HDFS | grep insertion | wc
git log --since="60 days ago" --oneline --shortstat --grep HDFS | grep insertion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
git log --since="60 days ago" --oneline --shortstat --grep HDFS | grep deletion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
# YARN (commits, inserted, deleted)
git log --since="60 days ago" --oneline --shortstat --grep YARN | grep insertion | wc
git log --since="60 days ago" --oneline --shortstat --grep YARN | grep insertion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
git log --since="60 days ago" --oneline --shortstat --grep YARN | grep deletion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
# Spark (commits, inserted, deleted)
git clone https://github.com/apache/spark.git
cd spark
git log --since="60 days ago" --oneline --shortstat | grep insertion | wc
git log --since="60 days ago" --oneline --shortstat | grep insertion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
git log --since="60 days ago" --oneline --shortstat | grep deletion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
# Storm (commits, inserted, deleted)
git clone https://github.com/apache/incubator-storm.git
cd incubator-storm
git log --since="60 days ago" --oneline --shortstat | grep insertion | wc
git log --since="60 days ago" --oneline --shortstat | grep insertion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
git log --since="60 days ago" --oneline --shortstat | grep deletion | cut -d " " -f 5 | perl -lne '$x += $_; END { print $x; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment