mkevac / debugcharts Goto Github PK
View Code? Open in Web Editor NEWVery simple charts with some debug data for Go programs
License: MIT License
Very simple charts with some debug data for Go programs
License: MIT License
hi,
very useful chart package. However, the chart is show date/time starting Jan 17, 9:52am. Have not investigated why.
thanks,
eddie
=============================
WARNING: DATA RACE
Write at 0x000002c31d28 by goroutine
25:
aithub.com/mkevac/debuacharts. (*server) gatherData0
/go/pkg/mod/github.com/mkevac/[email protected]/debugcharts.go:125+0x472
github.com/mkevac/debugcharts.init.o•dwrap•1()
/go/pkg/mod/github.com/mkevac/[email protected]/debugcharts.go:193+0x39
Previous read at 0x000002c31d28 by goroutine 962:
[failed to restore the stack]
Goroutine 25 (running) created at:
github.com/mkevac/debugcharts.init.0(
/go/pkg/mod/github.com/mkevac/[email protected]/debugcharts.go:193+0x507
add chart for monitoring CPU usage, thanks.
Highcharts is a great product, but the licensing terms aren't. Please switch to a library like flot
that has less restrictive license terms.
Errors happen all the time at scale. I'm hesitant to deploy a service to production built with this knowing that log.Fatal() might be called and my application would exit. I think log.Println/return pair would be sufficient in most of the cases.
Alternatively have it configurable with a package-level variable.
since you've download static js script. I think it would be better to add plotly to bindata.
when accessing charts i see only one empty chart and a bunch of errors in console:
Uncaught TypeError: Cannot read property 'length' of null
at new m (plotly-latest.min.js:7)
at m (plotly-latest.min.js:7)
at Object.plot (plotly-latest.min.js:7)
at d (plotly-latest.min.js:7)
at Object.r.plot (plotly-latest.min.js:7)
at r.drawData (plotly-latest.min.js:7)
at Object.l.syncOrAsync (plotly-latest.min.js:7)
at Object.r.plot (plotly-latest.min.js:7)
at Object.r.newPlot (plotly-latest.min.js:7)
at Object.success (main.js:26)
m @ plotly-latest.min.js:7
m @ plotly-latest.min.js:7
plot @ plotly-latest.min.js:7
d @ plotly-latest.min.js:7
r.plot @ plotly-latest.min.js:7
r.drawData @ plotly-latest.min.js:7
l.syncOrAsync @ plotly-latest.min.js:7
r.plot @ plotly-latest.min.js:7
r.newPlot @ plotly-latest.min.js:7
(anonymous) @ main.js:26
j @ jquery-2.1.4.min.js:2
fireWith @ jquery-2.1.4.min.js:2
x @ jquery-2.1.4.min.js:4
(anonymous) @ jquery-2.1.4.min.js:4
load (async)
send @ jquery-2.1.4.min.js:4
ajax @ jquery-2.1.4.min.js:4
n.(anonymous function) @ jquery-2.1.4.min.js:4
getJSON @ jquery-2.1.4.min.js:4
(anonymous) @ main.js:17
j @ jquery-2.1.4.min.js:2
fireWith @ jquery-2.1.4.min.js:2
ready @ jquery-2.1.4.min.js:2
I @ jquery-2.1.4.min.js:2
4plotly-latest.min.js:7 Uncaught Error: gd.data must be an array
at plotly-latest.min.js:7
at I (plotly-latest.min.js:7)
at Object.t [as extendTraces] (plotly-latest.min.js:7)
at WebSocket.ws.onmessage (main.js:117)
may be chart lib was updated?
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7ad1a0]
goroutine 19 [running]:
github.com/mkevac/debugcharts.(*server).gatherData(0xa9bc60)
C:/golang/gowork/src/github.com/mkevac/debugcharts/debugcharts.go:112 +0x210
created by github.com/mkevac/debugcharts.init.1
C:/golang/gowork/src/github.com/mkevac/debugcharts/debugcharts.go:158 +0x2f9
exit status 2
when use this
found default log Prefix not exists, like
log.Println("xxxx")
2017/09/04 13:25:10 xxxx
2017/09/04 13:25:10 xxxx
to
xxxx
xxxx
Hi, remove init() and create func that will returned http.ServeMux server with all necessary handlers to allow developers to choose addr and port.
And hide Assert funcs
(if you have not many time let me do this)
That will be great.
Or how to add expvar to this?
Can you read expvar automatically via enumerate exporing variables or smth like this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.