From 07f014314396df53d8a8d32af2ca4422a4f89998 Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Wed, 10 Feb 2016 15:08:36 -0500 Subject: [PATCH] Added timetrack Former-commit-id: 64b9508f962a620b8091f0ba55d32600d57d76f7 [formerly 922f5f19d34b91a136623f060e834ae8030eb133] [formerly 7919da5b07010be47965356b04f6c7bb58eeee7f [formerly 7922544b18be98c93474b5dc16d3520e5ee4a919]] Former-commit-id: e71d09a3676fc4e67f5d89101a66603c644a9828 [formerly ffe838e2556bbdbac45699343c9f5f371143b998] Former-commit-id: 5dbb6f7298cedafed9bd6d379a1ef8c17485a5cf --- utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils.go b/utils.go index 2e151dc..992220c 100644 --- a/utils.go +++ b/utils.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "log" "math/rand" "sort" "strings" @@ -164,6 +165,11 @@ func getImportantVersions(p WikiData) []versionsInfo { return r } +func timeTrack(start time.Time, name string) { + elapsed := time.Since(start) + log.Printf("%s took %s", name, elapsed) +} + func rebuildTextsToDiffN(p WikiData, n int) string { dmp := diffmatchpatch.New() lastText := ""