The last time Hackerfall tried to access this page, it returned a not found error. A cached version of the page is below, or click here to continue anyway

Thyme: a simple CLI to measure human time andfocus

Its like a CPU profiler, but for your productivity rather than your machines

Do you ever think about how to make yourself a more productive programmer? At Sourcegraph, this is a question we think about every day. Our entire mission is to make your life as a developer easier and more efficient.

Thyme is a sampling profiler for your productivity.

Programmers seek out and use tools that we think will help us squeeze the most out of every minute of every hour of every daybut how well do these tools actually work? We need answers to questions like:

Time-tracking programs are a dime a dozen, but when we looked around, we didnt find any that wed want to use day-to-day as developers. Existing trackers made you manually enter information, use a clunky GUI, or didnt let you drill down into the data. We wanted a time-tracking utility that had all the things youd expect from a great developer tool: a simple and easy CLI, full control and access to the raw data, and source code thats hackable and open.

So we wrote Thyme, an open-source command-line tool that lets you easily track and analyze the time you spend on your computer. Think of it as a sampling profiler, but for You instead of your machine.

Finding actionable productivity insights withThyme

Thyme tracks which applications you use over time and then helps you explore the data to find actionable insights to boost your productivity. Heres how I used it for this very purposeas I was writing it.

Thyme was written in 2 parts. Part 1, which tracks application usage, was written first. Part 2 displays pretty charts, and was written the day after. Because I had the tracking code working before I wrote the charting logic, I was able to use Thyme to track my app usage as I wrote part 2. Heres what I found.

Chart 1: Application usagetimeline

This first chart shows application usage over the course of the afternoon, from 4pm to 8pm. On the chart, you can see that I had open 3 distinct applications: Google Chrome, Slack, and [email protected]~. The last one is my terminal where I run Emacs (my computers name is claudelong story). Thyme splits the timeline into 3 rows:

Thymes timeline of application usage

Observations:

Chart 2: Detailed application usage breakdown

This second chart breaks down the timeline of application usage by window name. You can see what I was viewing in each application.

Thyme-line of application windows

Observations:

Chart 3: Which apps do you rely onoverall?

This third chart shows an aggregate overview of which applications I used during my afternoon coding session. The interesting thing to note here is the differences in relative order between open, visible, and active applications. I had Slack open the whole time, but I basically never used it. Chrome was by far the most visible, because I was using it frequently to look up documentation and usage examples and test out the Thyme dashboard. But the application that I actually used the most was my terminal, which contained my editor.

Takeaways

Here are some concrete, actionable takeaways I took from diving into this data:

Thyme yourself

If youre interested in using Thyme to investigate your own productivity, you can install Thyme here. Its a single command line tool with 2 simple parts: a time tracker and a data visualizer.

The Thyme tracker snapshots all open windows on your computer at a a given point in time. You can have it output this information to a file. Its like a sampling profiler, but instead of CPU time and processes, it looks at human time and open application windows. You can make it run every 30 seconds like this:

$ watch -n 30 thyme track -o thyme.json

The Thyme data explorer reads data from the tracker output file and shows a single page with interactive charts. You run it with a single command, too:

$ thyme show -i thyme.json -w stats > thyme.html

Then just open thyme.html in your favorite web browser and voila, you get the pretty charts you see above.

All the information Thyme collects is kept safely on your local disk so you have full control over your data. It never sends any information over the Internet.

Thyme currently supports Linux (with X-Windows) and macOS support is on the way soon. Its built with simplicity and hackability in mind. The code is open-source, well-documented, and easily extensible. Try it out and let us know what you think!

Continue reading on text.sourcegraph.com