Add stats package and node related statistics model

This commit is contained in:
Audrius Butkevicius
2014-08-21 23:45:40 +01:00
parent eee702f299
commit 0cdb0daa8c
6 changed files with 156 additions and 6 deletions

17
stats/debug.go Executable file
View File

@@ -0,0 +1,17 @@
// Copyright (C) 2014 Jakob Borg and Contributors (see the CONTRIBUTORS file).
// All rights reserved. Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
package stats
import (
"os"
"strings"
"github.com/syncthing/syncthing/logger"
)
var (
debug = strings.Contains(os.Getenv("STTRACE"), "stats") || os.Getenv("STTRACE") == "all"
l = logger.DefaultLogger
)