141 Commits

Author SHA1 Message Date
Paul Bellamy
1cdedcd3a7 Review feedback 2016-01-27 11:10:51 +00:00
Paul Bellamy
66790f4436 use immutability for the NodeSet 2016-01-27 11:10:51 +00:00
Tom Wilkie
41d48224aa Fix tests 2016-01-25 13:46:28 -08:00
Tom Wilkie
b8daa02488 Memoise & cache the result of renderers, so we don't recalculate views multiple times. 2016-01-25 13:31:10 -08:00
Tom Wilkie
7a70a076b8 Make counter zero value useable. 2016-01-25 12:52:19 -08:00
Paul Bellamy
b809f94272 make zero value of LatestMap valid 2016-01-25 17:33:24 +00:00
Tom Wilkie
d1c0fcec2d Review feedback. 2016-01-25 08:39:42 -08:00
Paul Bellamy
d44f9cbf77 fixing panic on EdgeMetadatas deserialization by making valid zero value 2016-01-25 15:51:14 +00:00
Paul Bellamy
5751db2a5a Always merge into the larger ps.Map
Because they are commutative and immutable, we can do this!
2016-01-25 15:25:01 +00:00
Tom Wilkie
728572cb51 Lint 2016-01-24 14:06:44 -08:00
Tom Wilkie
e125fb5e88 Add tests for counters 2016-01-24 14:04:08 -08:00
Tom Wilkie
f2df789503 Add tests for latest map. 2016-01-24 13:55:48 -08:00
Tom Wilkie
f071067289 Extend testing for EdgeMetadatas. 2016-01-24 09:50:08 -08:00
Tom Wilkie
bc3f946810 Make NodeMetadatas immutable. 2016-01-23 13:02:16 -08:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Paul Bellamy
3d32d10e2d fixing up some performance issues in NodeSet 2016-01-19 16:31:08 +00:00
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00
Paul Bellamy
3cda328976 remove hostID from container image node ids 2016-01-19 16:47:48 +01:00
Paul Bellamy
56122dd0cc Details panel backend redesign
Megasquish:
  [app] remove unused edge endpoint
  [WIP] refactoring node details api endpoint
  [WIP] plumbing the children through the rendering process
  adding IDList.Remove and StringSet.Remove
  [WIP] working on adding parents to detailed node renderings
  WIP UI components with mock backend data for new details
  grouping children by type
  UI components for node details health and info
  metric formatters for details panel
  Column headers and links for details table
  [WIP] started on rendering node metadata and metrics in the detail view
  DetailedNode.LabelMajor -> DetailedNode.Label
  rendering decent labels for parents of detailed nodes
  render metrics onto the top-level detailed node
  removing dead code
  Links to relatives
  metrics have a Format not Unit
  Show more/less actions for tables and relatives
  adjusted metric formatter
  TopologyTagger should tag k8s topology nodes
  make renderablenode ids more consistent, e.g. container:abcd1234
  working on rendering correct summaries for each node
  adding report.Node.Rank, so that merging is independent of order
  rendering children and parents correctly
  output child renderableNode ids, so we can link to them
  add group field to metrics, so they can be grouped
  Refactored details health items to prepare for grouping
  add metrics to processNodeSummaries
  hide summary section if there is no data for it
  fixing up tests
  moving detailed node rendering into a separate package
  Node ID/Topology are fields not metadata
    - This way I think we don't have to care about Metadata being non-commutative.
    - ID and topology are still non-commutative, as I'm not sure how to sanely
  merge them, but it's possible we don't care.
  host memory usage is a filesize, not a percent
  working on fixing some tests
  adding children to hosts detail panel
    - Had to redo how parents are calculated, so that children wouldn't interfere with it
    - have to have the host at the end because it is non-commutative
  only render links for linkable children (i.e. not unconnected processes)
  resolving TODOs
  fixing up lint errors
  make nil a valid value for render.Children so tests are cleaner
  working on backend tests
  make client handle missing metrics property
  Stop rendering container image nodes with process summaries/parents
  fix parent link to container images
  Calculate parents as a set on report.Node (except k8s)
  refactoring detailed.NodeSummary stuff
  removing RenderableNode.Summary*, we already track it on report.Node
  working on tests
  add Columns field to NodeSummaryGroup
  fixing up render/topologies_test
  fix children links to container images
  get children of hosts rendering right
  working on host renderer tests
  Change container report.Node.ID to a1b2c3;<container>
  The id should be globally unique, so we don't need the host id.
    This lets the kubernetes probe return a container node with the pod id,
    which will get merged into the real containers with other reports. The
    catch is that the kubernetes api doesn't tell us which hostname the
    container is running on, so we can't populate the old-style node ids.
  change terminology of system pods and services
  Fix kubernetes services with no selector
  Fixes handling of kubernetes service, which has no pods
  fix parent links for pods/services
  refactor detailed metadata to include sets and latest data
  fixing up host rendering tests
  fleshing out tests for node metadata and metrics
  don't render container pseudo-nodes as processes
  Update test for id format change.
2016-01-19 16:39:37 +01:00
Tom Wilkie
caff695f96 Gather per-process CPU and memory metrics. 2015-12-16 14:38:21 +00:00
Tom Wilkie
e1585e7ac1 Merge pull request #711 from weaveworks/576-host-metrics
Add host memory and CPU usage metrics
2015-12-04 14:38:48 +00:00
Tom Wilkie
4a475466f6 Add host memory and CPU usage metrics 2015-12-04 13:57:32 +00:00
Tom Wilkie
490f650755 Introduce intermediate type for on-the-wire controls encoding. 2015-12-04 12:43:04 +00:00
Tom Wilkie
d747eebcb7 Omit controls field from json if emtpy. 2015-12-04 10:25:56 +00:00
Paul Bellamy
5dcd53e24c fix bug in metrics first/last calculation if second arg was zero 2015-11-12 17:06:40 +00:00
Paul Bellamy
9176699941 omit metric first/last timestamps if they are zero 2015-11-12 17:06:40 +00:00
Paul Bellamy
8f63d7be7f Metrics plumbing for reports.
- base load graph x-axis on data, not a hardcoded window
- format memory dynamically to scale
- add some tests for the immutability of metrics
- use ps.List for Sample storage, so it is immutable. Have to implement custom marshalling
- adding tests for report.Metrics
- check the ordering of the json samples
- Make the nil value for Metrics valid.
- Sort samples from oldest to newest on the wire.
2015-11-11 17:16:13 +00:00
Tom Wilkie
47ef1e02b3 Shortcut app -> UI ws push for certain reports. 2015-11-10 13:46:57 +00:00
Tom Wilkie
a89c0b9b88 Make an empty StringSet nil. 2015-11-09 16:25:49 +00:00
Tom Wilkie
5e2c165fd8 Review feedback 2015-11-09 11:38:15 +00:00
Tom Wilkie
43d0ce986f Add 'latest' CRDT; use it to store container state.
Also use same technique to merge the controls, returning the latest
set of controls instead of the union.
2015-11-06 18:26:38 +00:00
Tom Wilkie
76d34330a9 Add Control plumbing. 2015-11-06 17:39:48 +00:00
Tom Wilkie
bdf39aeaab Don't mutate the input array for MakeStringSet 2015-10-29 12:23:38 +00:00
Tom Wilkie
6e9ad995b0 Use Node.Sets for Docker/Weave IPs 2015-10-27 14:12:35 +00:00
Tom Wilkie
6913431138 Make IDList an alias for StringSet 2015-10-27 14:12:34 +00:00
Tom Wilkie
5a0e23b3ea Some additional methods for using Sets. 2015-10-27 14:12:34 +00:00
Peter Bourgon
c68516ec22 report: add StringSet (port of IDList, effectively) 2015-10-27 14:12:34 +00:00
Tom Wilkie
cd97708af0 Review feedback 2015-10-21 10:04:27 +00:00
Paul Bellamy
6ad182a144 Merge pull request #441 from weaveworks/kubernetes
Basic Kubernetes Integration
2015-10-06 14:49:55 +01:00
Paul Bellamy
be1d1d52d0 Basic Kubernetes integration
* Added helper for installing scope on gcloud
* Added topologies Pods and Pods-by-Service
* Uses k8s.io/kubernetes/pkg/client/cache for the client
* Filter kube-system nodes by default
* Only show the k8s topologies if we've received a non-empty k8s report
2015-10-06 12:55:51 +01:00
Tom Wilkie
d3aa975eb9 In containers view, show short lived connections to/from the internet by including port mappings in the join. 2015-10-01 16:31:38 +00:00
Tom Wilkie
50e20b1a34 When flattening edge metadata and propagating to the server end of the edge, reverse the direction of the metadata. 2015-09-24 05:28:40 +00:00
Tom Wilkie
cdf051ffe9 Test counter merging. 2015-09-23 09:53:40 +00:00
Tom Wilkie
f9815afad3 Remove some duplicate functionality, add some basic tests. 2015-09-23 09:46:11 +00:00
Tom Wilkie
15417b6b02 Show container image details for containers. 2015-09-22 05:48:18 +00:00
Tom Wilkie
8b424df2be Review feedback. 2015-09-16 09:29:42 +00:00
Tom Wilkie
fcb7c47bd9 Always include endpoint nodes brought in by procspy, even if they get merged with conntracked endpoints. 2015-09-16 03:46:15 +00:00
Tom Wilkie
7eeb768787 Nodes.Merge should Merge Node(s)! 2015-09-15 10:03:01 +00:00
Tom Wilkie
2f760f2f33 Cache generated ids to relieve pressure on the GC 2015-09-09 15:01:58 +00:00
Tom Wilkie
d411afd916 WithNode is a CPU hog. 2015-09-09 15:01:57 +00:00