diff --git a/profiling/profile.go b/profiling/profile.go new file mode 100644 index 0000000..f7beae1 --- /dev/null +++ b/profiling/profile.go @@ -0,0 +1,12 @@ +package profile + +import ( + "time" + "log" +) + +func Duration(invocation time.Time, name string) { + elapsed := time.Since(invocation) + + log.Printf("%s lasted %s", name, elapsed) +}