Ask Bjørn Hansen 12 лет назад
Родитель
Сommit
4bbb4e2361
2 измененных файлов с 0 добавлено и 26 удалено
  1. 0 2
      geodns.go
  2. 0 24
      monitor.go

+ 0 - 2
geodns.go

@@ -167,6 +167,4 @@ func main() {
 		f.Close()
 	}
 
-	//os.Exit(0)
-
 }

+ 0 - 24
monitor.go

@@ -4,7 +4,6 @@ import (
 	"code.google.com/p/go.net/websocket"
 	"encoding/json"
 	"fmt"
-	"github.com/abh/go-metrics"
 	"html/template"
 	"io"
 	"log"
@@ -213,29 +212,6 @@ func (s RatesByCount) Less(i, j int) bool {
 	return ic > jc
 }
 
-func metricHTML(name string, i interface{}) (string, int64) {
-	// https://github.com/rcrowley/go-metrics/blob/master/log.go
-	switch m := i.(type) {
-	case metrics.Meter:
-		str := fmt.Sprintf(
-			"<h4>meter %s</h4>\n"+
-				"count: %9d<br>"+
-				"  1-min rate:  %12.2f\n"+
-				"  5-min rate:  %12.2f\n"+
-				"15-min rate: %12.2f\n"+
-				"  mean rate:   %12.2f\n",
-			name,
-			m.Count(),
-			m.Rate1(),
-			m.Rate5(),
-			m.Rate15(),
-			m.RateMean(),
-		)
-		return str, m.Count()
-	}
-	return "", 0
-}
-
 func round(val float64, prec int) float64 {
 
 	var rounder float64