wiring up pprof.
This commit is contained in:
parent
ee78cf8f2f
commit
8e91a3446f
1 changed files with 4 additions and 3 deletions
|
@ -4,6 +4,8 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
_ "net/http/pprof"
|
||||||
|
|
||||||
"github.com/wcharczuk/go-chart"
|
"github.com/wcharczuk/go-chart"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -16,8 +18,8 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||||
StrokeWidth: chart.Disabled,
|
StrokeWidth: chart.Disabled,
|
||||||
DotWidth: 3,
|
DotWidth: 3,
|
||||||
},
|
},
|
||||||
XValues: chart.Sequence.Random(4096, 1024),
|
XValues: chart.Sequence.Random(8192, 1024),
|
||||||
YValues: chart.Sequence.Random(4096, 1024),
|
YValues: chart.Sequence.Random(8192, 1024),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -27,7 +29,6 @@ func drawChart(res http.ResponseWriter, req *http.Request) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err.Error())
|
log.Println(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func unit(res http.ResponseWriter, req *http.Request) {
|
func unit(res http.ResponseWriter, req *http.Request) {
|
||||||
|
|
Loading…
Reference in a new issue