Governor is a small application recording every invocation of the core Git binary on GitHub Enterprise Server. Read on to learn how to use it and how to gather helpful statistics and insights about your developer's usage of Git.
GitHub Enterprise Server has an internal monitor and concurrency controller for Git processes called Governor, which keeps count of Git operations. A command line utility to query Governor data (
First, let's have a look at Governor's syntax. We will focus on common examples and queries later in this article.
Individual (Top) queries
Governor can find the top N records of Git queries for a given metric (column). The resulting table will be sorted by that column.
The column can be any of
Governor can find the top N groups of Git queries for a given grouping function and a given metric (column).
The grouping function can be any of
The column can be any of
Please see below for an explanation of some of the resulting table columns:
Options for all queries
Every query type can be limited in scope in the following ways:
The following are long options for aggregate queries:
Now, that we know Governor's syntax, let's have a look at typical usage scenatios and example queries.
Analyzing Git traffic
The overall summary provides the total and average number of Git requests over a recorded period:
The following set of sample commands may help to identify Git traffic patterns or spikes in activity. They make use of the
To dive a bit deeper, the following queries indicate the actual volume of Git traffic:
Furthermore, you might be interested in bursts of concurrent clones. A thundering herd of clones can cause a spike in resource usage. You can check for concurrent clones by aggregating on
The above metrics are only so useful in performance profiling. But Governor also collects CPU timing data, which is helpful in diagnosing high CPU utilization caused by Git operations.
Sometimes, you want to find out which repository or program caused a specific disk write peak that you've seen. The following commands may be of help here.
Governor ships with GitHub Enterprise Server and is able to provide insights about how your developers use Git and which implications their behavior may have on your GitHub Enterprise Server instance. In Enterprise Support, we regularly rely on Governor to help us answer all kinds of questions related to Git usage. Now, you can do the same.
What are your experiences with Governor? Feel free to comment below!
Beta Was this translation helpful? Give feedback.