tpl: Fix metrics hint tracking
authorCameron Moore <moorereason@gmail.com>
Fri, 8 Jan 2021 16:26:35 +0000 (10:26 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 8 Jan 2021 19:01:11 +0000 (20:01 +0100)
commit0004a733c85cee991a8a170e93cd69c326cc8f2f
tree3556fc9533bfd1ce705da0e0e4fd04aac8288e34
parent8a26ab0bc5dd9fa34e1362681fc08b0e522cd4ea
tpl: Fix metrics hint tracking

When tracking for cache hints, track the same template name as the call
to MeasureSince in Execute.  When referencing a partial "foo", the value
of `n` does not match `templ.Name()` (`partials/foo` versus
`partials/foo.html`).  This was causing hints to go untracked since
there was no existing metric to append the hint to.

Fixes #8125
tpl/partials/partials.go