aboutsummaryrefslogtreecommitdiff
path: root/eval.go
diff options
context:
space:
mode:
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-11 15:16:29 +0900
committerFumitoshi Ukai <fumitoshi.ukai@gmail.com>2015-06-11 15:19:23 +0900
commit432a242562d1802f3f2a182f42df86b1e4696271 (patch)
treea9d496fc398b363755ca48dd4ffa9b6e7919f6e1 /eval.go
parent0daac1fbbb82ced82786bbdee2e716a38a16762b (diff)
downloadkati-432a242562d1802f3f2a182f42df86b1e4696271.tar.gz
add -kati_trace_event=<json filename>
if this option is given, it outputs trace json file for chrome://tracing for makefile include traces.
Diffstat (limited to 'eval.go')
-rw-r--r--eval.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/eval.go b/eval.go
index fad679e..82742fd 100644
--- a/eval.go
+++ b/eval.go
@@ -21,7 +21,6 @@ import (
"io/ioutil"
"path/filepath"
"strings"
- "time"
)
type FileState int
@@ -264,9 +263,9 @@ func (ev *Evaluator) EvaluateVar(name string) string {
}
func (ev *Evaluator) evalIncludeFile(fname string, c []byte) error {
- t := time.Now()
+ te := traceEvent.begin("include", literal(fname))
defer func() {
- addStats("include", literal(fname), t)
+ traceEvent.end(te)
}()
mk, ok, err := LookupMakefileCache(fname)
if !ok {