Welcome to the wiki page of the stats project!

Compiling and installing stats

After having cloned the repository ($ git clone git@gitorious.org:stats/stats.git), just run $ make and # make install from the root directory of stats.

Basic usage

From one of your project’s directory, run:

$ stats

For instance from the stats directory it produces:

stats results:
 number of files: 12  
 number of lines: 1011  
  empty lines:    122   (12.07%)  
  comment lines:  50    (4.95%)  
  doc lines:      225   (22.26%)  
  code lines:     614   (60.73%)  
 characters (if UTF8): 36516  
 total bytes: 36516 (35.7 kio, 0.03 Mio)  
 average lines per file: 84  
 average bytes per file: 3043 (2.97 kio)

You may want to specify just some directories:

$ stats src include

By default stats only takes care of files whose extension is .c or .cpp. You might add your own as follow:

$ stats pythondir -c.py

It shall analyze the .py files. Anyway, don’t ask me why I chose -c, I don’t remember.

It is also possible to tell stats to run in verbose mode with option -v.

Use the logger

With each passing day your productivity makes you wondering how fast is growing your code project. In order to end up your dreams, you can get such information using the logger of stats. To do this, just run stats as usual with the option -log:

$ stats src include -log

It will create a file named stats.log. Each time you run stats with -log the file saves your current number of lines of code and other information as shown before. You can target an alternative log file using -log=filename.

Display the logs

Once you have a log file with some entries you may see the curve of the evolution of your project’s lines of code by running $ stats-display. It tries to load the default file stats.log unless you specify the log file explicitly as follow:

$ stats-display logfile

Run stats-display with --help to get a full list of available options.

Currently the only available displayer uses the GL, but other ones shall be added in the future.