git/list[1] front-page[2] threads[3] people[4] search[5] about
 

More 'shortlog' statistics models?

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jul 15, 2009, 02:07 UTC
Message-ID
<alpine.LFD.2.01.0907141852400.13838@localhost.localdomain>

So I was just thinking about one of the things I've wondered about for a while: when do I (and others) make most of my commits?

I mean literally queries about time-of-day or day-of-week issues. I know we have the information, and I can write silly scripts to get it, but I'm wondering if somebody would actually be willing to make our current 'shortlog' statistics gatherer do it automatically.

Right now shortlog groups by name, and I'd like to group by other things.
Here's an example of what I just played around with:
	git log --since=6.months --pretty=format:%cD --author=torvalds |
		cut -d, -f1 |
		sort |
		uniq -c |
		sort -n

gives you the weekdays on which I've done most of my commits in the last six months. And I think it's kind of interesting. I really do calm down a bit on weekends, and do only about half as many commits on Saturday and Sunday as I do during the week.

The same is true across the board, btw. Except while _I_ tend to do most of my commits on Mondays, while on average, Linux kernel people seem to do most of them on Fridays.

But what about time zones? Change the 'cut' to use "-d' ' -f6" instead, and it's clear that -0700 is the top time zone (US West coast), but +0100 and +0200 (much of Europe) are pretty active.

How about time? "cut -d' ' -f5 | cut -d: -f1": The least productive time hour is 05:xxAM (not a big surprise, perhaps), while the most productive time is apparently early afternoon. But there I'm odd: most of my commits by far are in the morning (ie 8AM to noon).

Anyway, I can do all this with sorting, but it's fun enough that I wonder if we should make it easier?

		Linus
Next: Junio C Hamano
Message 1 of 8 in “More 'shortlog' statistics models?”
  1. Linus TorvaldsJul 15, 2009
  2. Junio C HamanoJul 15, 2009
  3. 1/2 shortlog: refactor insert_one_record()Johannes Schindelin, Jul 15, 2009
  4. 2/2 shortlog: add '--sort-key' and '--sort-key-regexp' optionsJohannes Schindelin, Jul 15, 2009
  5. Linus TorvaldsJul 15, 2009
  6. Michał KiedrowiczJul 15, 2009
  7. Jakub NarebskiJul 15, 2009
  8. Sverre RabbelierJul 15, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.