Mercurial > gemma
changeset 369:a43495c91856
Show timing of writing in WFS proxy.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 09 Aug 2018 15:50:46 +0200 |
parents | 78588014ad0a |
children | fe87457a05d7 |
files | controllers/externalwfs.go |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/controllers/externalwfs.go Thu Aug 09 15:19:56 2018 +0200 +++ b/controllers/externalwfs.go Thu Aug 09 15:50:46 2018 +0200 @@ -10,6 +10,7 @@ "net/http" "net/url" "strings" + "time" "github.com/gorilla/mux" "golang.org/x/net/html/charset" @@ -176,11 +177,13 @@ } go func(force io.ReadCloser) { + start := time.Now() defer func() { //r.Close() w.Close() pw.Close() force.Close() + log.Printf("rewrite took %s\n", time.Since(start)) }() if err := rewrite(w, r, from, to); err != nil { log.Printf("rewrite failed: %v\n", err)