From b8a8a783be4f3b61b8f42d7b854107f46f84d3e6 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 226fceb7049d8532395e83b2c5af7014fd00cb3b [formerly 7922544b18be98c93474b5dc16d3520e5ee4a919]]] Former-commit-id: e71d09a3676fc4e67f5d89101a66603c644a9828 [formerly ffe838e2556bbdbac45699343c9f5f371143b998] Former-commit-id: 5dbb6f7298cedafed9bd6d379a1ef8c17485a5cf Former-commit-id: 07f014314396df53d8a8d32af2ca4422a4f89998 --- 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 := ""