Commit Graph

16 Commits

Author SHA1 Message Date
Tom Wilkie
57f7b4f2e6 Rename NodeMetadata -> Node 2015-09-03 16:18:54 +00:00
Tom Wilkie
afc2788777 Move EdgeMetadata into the NodeMetadata struct. 2015-09-02 14:32:44 +00:00
Tom Wilkie
1f6b3d4a45 Move Adjacency info inside the NodeMetadata struct; move pseudo node generation to the probes. 2015-08-28 15:20:27 +00:00
Peter Bourgon
d5ab8177f6 probe: fixes for new merge semantics 2015-08-26 12:02:03 +01:00
Alfonso Acosta
bdd886a28f Don't report empty fields from process 2015-08-19 16:50:20 +00:00
Peter Bourgon
b9afa67ad6 gopacket-based traffic sniffing 2015-08-03 10:55:59 +02:00
Peter Bourgon
3dd59c8b9b Fixes to NodeMetadata
NewNodeMetadata -> MakeNodeMetadata. It doesn't return a pointer, so
Make is more idiomatic.

Invoke MakeNodeMetadata when necessary. The zero value for a
NodeMetadata is no longer valid.

Split MakeNodeMetadata to two constructors. MakeNodeMetadata when you
don't have anything to prepopulate; MakeNodeMetadataWith when you do.

Also, a fix to the tests in app. We unmarshal a RenderableNode struct,
which has a JSON-ignored NodeMetadata field. The zero value is invalid,
so we need to fix that before performing comparisons.
2015-07-30 17:20:44 +02:00
Peter Bourgon
70f8c62415 Don't panic tests on Darwin.
Use the proper DialStub in the container setup.

Also, one change to increase test coverage.
2015-07-30 15:16:26 +02:00
Peter Bourgon
fb7eed103e Merge pull request #320 from weaveworks/process-names-on-darwin
Naïve process walker for Darwin
2015-07-20 16:37:25 +01:00
Tom Wilkie
f85195308c report.Metadata -> map[string]string 2015-07-16 12:06:05 +00:00
Peter Bourgon
b585a362ac Naïve process walker for Darwin
This fixes the regression where process names weren't appearing for
Darwin probes. Makes testing easier.

Also, changes the process walker to operate on value types. There's no
performance advantage to using reference types for something of this
size, and there appeared to be a data race in the Darwin port that
caused nodes to gain and lose process names over time.

Also, restructures how to enable docker scraping. Default false when run
manually, and enabled via --probe.docker true in the scope script.
2015-07-16 12:33:59 +02:00
Tom Wilkie
c2065836e2 Make NodeMetadata a struct, move existing map[string]string to NodeMetadata.Metadata 2015-07-15 10:06:36 +00:00
Peter Bourgon
f4b3930a19 Probe re-org
- tag/weave* -> package overlay
- tag/origin_host* -> package host
- tag/topology* -> package main
2015-06-30 10:18:00 +02:00
Tom Wilkie
b9e968ff43 Cache the walk of the process tree, reusing it in docker tagger and process reporter.
Update the cache every spy tick.

This change make CPU usage of scope on my box go from ~40% to ~17%.
2015-06-29 11:16:38 +00:00
Tom Wilkie
eb250ecb7c Trim whitespace from process names
This causes detailed node lookups for the grouped-by-process-name view to fail.  Also, add a test for process walker trimmming whitespace, and a test the process-by-name view gives the right result.
2015-06-24 14:01:17 +00:00
Tom Wilkie
560cf66454 Refactor PIDTree
- Move pidtree to its own module and disaggregate it into tree, walker and reporter.
- Extend testing for probe/process
- Extend process metadata; add command line & # threads.
2015-06-23 09:40:35 +00:00