mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
Fix a couple of minor issue for goreportcard and add badge for it.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Scope
|
||||
|
||||
[](https://circleci.com/gh/weaveworks/scope/tree/master) [](https://coveralls.io/r/weaveworks/scope) [](https://weave-scope-slack.herokuapp.com)
|
||||
[](https://circleci.com/gh/weaveworks/scope/tree/master) [](https://coveralls.io/r/weaveworks/scope) [](https://weave-scope-slack.herokuapp.com) [](https://goreportcard.com/report/github.com/weaveworks/scope)
|
||||
|
||||
Weave Scope automatically generates a map of your application, enabling you to
|
||||
intuitively understand, monitor, and control your containerized, microservices based application.
|
||||
|
||||
@@ -62,6 +62,10 @@ func main() {
|
||||
}
|
||||
log.Println(ci.Timestamp.String())
|
||||
err = parser.DecodeLayers(data, &decoded)
|
||||
if err != nil {
|
||||
log.Printf("Error in DecodeLayers: %v", err)
|
||||
continue
|
||||
}
|
||||
for _, t := range decoded {
|
||||
switch t {
|
||||
case layers.LayerTypeEthernet:
|
||||
|
||||
@@ -76,15 +76,16 @@ func (t *PTracer) Stop() {
|
||||
}
|
||||
|
||||
// TraceProcess starts tracing the given pid
|
||||
func (t *PTracer) TraceProcess(pid int) *process {
|
||||
result := make(chan *process)
|
||||
func (t *PTracer) TraceProcess(pid int) {
|
||||
result := make(chan struct{})
|
||||
t.ops <- func() {
|
||||
process := newProcess(pid, t)
|
||||
t.processes[pid] = process
|
||||
process.trace()
|
||||
result <- process
|
||||
result <- struct{}{}
|
||||
}
|
||||
return <-result
|
||||
<-result
|
||||
return
|
||||
}
|
||||
|
||||
// StopTracing stops tracing all threads for the given pid
|
||||
|
||||
Reference in New Issue
Block a user