Split up huge Top module into smaller modules.
[virt-top.git] / src / README
old mode 100755 (executable)
new mode 100644 (file)
index 47382a5..1fd4be3
@@ -5,19 +5,37 @@ The code is structured into these files:
     String functions and other small utility functions.  This is
     included directly into virt_top.ml.
 
-  top.mli, top.ml
+  types.mli, types.ml
 
-    This is the virt-top program.
+    Various internally used types and functions operating on those
+    types.
+
+  collect.mli, collect.ml
+
+    Stats information is collected in these functions.
+
+  screen.mli, screen.ml
+
+    Various useful functions for drawing to the curses screen.
+
+  redraw.mli, redraw.ml
 
-    The two interesting functions are called 'collect' and 'redraw'.
+    Redraw the main display.
 
-    'collect' collects all the information about domains, etc.
+  csv_output.mli, csv_output.ml
 
-    'redraw' updates the display on each frame.
+    Functions which implement --csv mode.
+
+  stream_output.mli, stream_output.ml
+
+    Functions which implement --stream mode.
+
+  top.mli, top.ml
+
+    This is the virt-top program.
 
-    Another interesting function is 'start_up' which handles all
-    start-up stuff, eg. command line arguments, connecting to the
-    hypervisor, enabling curses.
+    'start_up' handles all start-up stuff, eg. command line arguments,
+    connecting to the hypervisor, enabling curses.
 
     The function 'main_loop' runs the main loop and has sub-functions
     to deal with keypresses, help screens and so on.
@@ -38,18 +56,18 @@ The code is structured into these files:
   opt_csv.ml
 
     Any code which needs the optional ocaml-csv library goes
-    in here.  This implements the --csv command line option.
+    in here.
 
-  opt_calendar1.ml, opt_calendar2.ml
+  opt_calendar.ml
 
     Any code which needs the optional ocaml-calendar library
-    (v1 or v2) goes in here.  This implements the --end-time
-    command line option.
+    (v2) goes in here.  This implements the --end-time command
+    line option.
 
   main.ml
 
     This is just a small bit of code to glue the modules together
-    Top + Opt_xml? + Opt_csv? + Opt_calendar{1,2}?
+    Top + Opt_xml? + Opt_csv? + Opt_calendar?
 
 The man-page is generated from the single file: