Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-10-04 23:12:51 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-10-07 19:00:07 +0300
commit5800a20a258378440e203a6c4a4343f5077755df (patch)
treedca1bd5030dccd56b4e9ad2dc1e037955aa4e20d /deps
parente2e8bcbec34702a27047b91b6b007a15f1fc0797 (diff)
metrics: Detect partialCached candidates
This commit adds a "cache potential" column when running `hugo --templateMetrics --templateMetricsHints`. This is only calculated when `--templateMetricsHints` is set, as these calculations has an negative effect on the other timings. This gives a value for partials only, and is a number between 0-100 that indicates if `partial` can be replaced with `partialCached`. 100 means that all execution of the same partial resulted in the same output. You should do some manual research before going "all cache".
Diffstat (limited to 'deps')
-rw-r--r--deps/deps.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/deps.go b/deps/deps.go
index 0c610c9ba..a7d77b5b1 100644
--- a/deps/deps.go
+++ b/deps/deps.go
@@ -135,7 +135,7 @@ func New(cfg DepsCfg) (*Deps, error) {
}
if cfg.Cfg.GetBool("templateMetrics") {
- d.Metrics = metrics.NewProvider()
+ d.Metrics = metrics.NewProvider(cfg.Cfg.GetBool("templateMetricsHints"))
}
return d, nil