1
2o Steps to add a statistic
3
4Define an enum value in statistic.h, such as STATISTIC_FOO.
5
6In statistic.c add a struct entry to to the statistic_name_map.
7
8In preferences.c add .array[N] = STATISTIC_FOO to .display_stats.
9
10In preferences.c add the symbolic name(s) for the statistic to stat_map.
11
12In top.c you should add the type to the sort function, if needed.
13
14Create or extend one of the .c files and add it to the Makefile.
15You could start by copying user.c and user.h.
16
17You should now be able to do: 
18 -stats foo
19
20The foo statistic will also be inserted as necessary, depending
21on the ordering of the preferences .display_stat.array, and the
22available space.
23