Fixed the error message, which was causing an error.
[profiler-torch.git] / README.md
index 45ca396..0e851f4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,18 +1,22 @@
 
-This is a simple profiler to estimate processing time per module per function. One should call
+This is a simple profiler to estimate processing time per module per function.
 
-  profiler.decorate(model[, functionsToDecorate])
+It seems to work okay, but there was no heavy testing so far. See test-profiler.lua for a short example.
 
-before starting the computation. It will replace functions specified in functionsToDecorate by instrumented versions which keep track of computation times. If functionsToDecorate is not provided, it will decorate by default updateOutput and backward.
+### profiler.color ###
 
-When the computation is over.
+This is a Boolean flag to state if the printing should be done in color. It is true by default.
 
-  profiler.print(model[, nbSamples])
+### profiler.decorate(model, [functionsToDecorate]) ###
 
-will print the measured processing times. If nbSamples is provided, the time per samples will also be printed.
+This function should be called before starting the computation.
 
-It seems to work okay, but there was no heavy testing so far.
+It replaces functions specified in functionsToDecorate by instrumented versions which keep track of computation times. If functionsToDecorate is not provided, it decorates by default updateOutput and backward.
 
---
-Francois Fleuret
-Dec 5th, 2016
+It also resets the accumulated timings to zero.
+
+### profiler.print(model, [nbSamples], [totalTime]) ###
+
+Prints the measured processing times. If nbSamples is provided, the time per samples will also be printed. If totalTime is provided, the percentages will also be printed.
+
+Non-Containers are hilighted with a '*' or in red.