24 Commits

Author SHA1 Message Date
Bryan Boreham
8e305f1ce9 Don't copy StringSet if merging a subset
Make StringSet.Merge() work like StringLatestMap.Merge()
2018-07-12 19:54:01 +00:00
Matthias Radestock
5b131b1ea6 refactor: remove a couple of report set Remove() functions
They were unused and their naming was inconsistent with similar
operations (that are called Delete()).
2017-07-03 01:26:22 +01:00
Paul Bellamy
1edeb8d190 Removing report.Node.WithID (#1315)
* removing usage of report.Node.WithID

* report.Topology.AddNode can use the node's ID field
2016-04-19 16:48:03 +01: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
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
a89c0b9b88 Make an empty StringSet nil. 2015-11-09 16:25:49 +00:00
Peter Bourgon
c68516ec22 report: add StringSet (port of IDList, effectively) 2015-10-27 14:12:34 +00:00
Tom Wilkie
4726b48f4e Move topology diff to render package. 2015-06-16 14:25:34 +00:00
Tom Wilkie
ae9ea5c97f Move mapping functions and main render function in render package. 2015-06-16 14:23:56 +00:00
Peter Bourgon
c65aecd9e1 Fix node scoping rules
We only want to scope (i.e. prefix with hostID) those addresses that are
deemed loopback, to disambiguate them. Otherwise, we want to leave
addresses in unscoped form, so they can be matched, and links between
communicating nodes properly made.

So, we make the isLoopback check in MakeAddressID, and omit hostID if
the address isn't loopback. So far so good.

But this breaks topology rendering, as we were relying on extracting
hostID from adjacency node IDs, to populate origin hosts in the rendered
node output. So we need another way to get origin host from an arbitrary
node.

A survey revealed no reliable way to get that information from IDs in
their new form. However, we have access to node metadata, so this
changeset introduces the OriginHostTagger, which tags each node with its
origin host, via the foreign-key semantics we'll use going forward.
2015-06-15 14:36:48 +02:00
Tom Wilkie
53456179e4 All merging of RenderableNodes, such that we can merge multiple topologies. 2015-06-11 17:11:10 +00:00
Tom Wilkie
719f933c21 Refactor MakeAdjacencyID & ParseAdjacencyID; add ParseNodeID (which separates scope and the rest of node id) 2015-06-10 09:21:45 +00:00
Peter Bourgon
667d8b8dd0 OriginHosts and OriginNodes become Origins
Another baby step towards #123, this change follows from #192 and merges
the two concepts of Origin in a renderable node. We also cut out a layer
of abstraction, and add an OriginTable method to Report, which directly
generates a table of info for the detail pane given any origin node ID.

Other changes from feedback:

- Assume origin IDs are unique and don't reflect.Dedupe
- Improve origin ID lookup
- Move OriginTable to detailed_node.go, as a free function
- rm app/detail_pane.go (empty)
2015-06-09 18:48:09 +02:00
Peter Bourgon
d438261742 HostMetadata becomes Host Topology
- All HostMetadata information becomes NodeMetadata
- Significant change to mechanics, but same net effect
- LocalNets becomes "local_networks", space-separated list of CIDRs
- Load becomes simple single string
- Use MakeHostNodeID for indexing into Host topology
- (That changes the app /origin/{id} handler; will be removed later)
2015-06-09 15:38:08 +02:00
Peter Bourgon
1e0b83eb6d Merge branch report-fields (#190) 2015-06-09 14:25:54 +02:00
Peter Bourgon
7c56939e22 Update IDList
- MakeIDList rather than NewIDList
- Iterate on test coverage
- Drop Copy method, for now
2015-06-08 19:52:26 +02:00
Peter Bourgon
4832ee76f3 Add the various ID constructors
- Use constructors instead of ScopeDelim everywhere
- Use constructors instead of IDDelim everywhere
- IDDelim is renamed EdgeDelim, for clarity
- Partial import of the new test fixtures, to be completed later
2015-06-08 17:53:01 +02:00
Tom Wilkie
0ade65d32a Refactor grouped topologies, topology 'views' and their http handlers 2015-05-27 14:17:47 +00:00
Tom Wilkie
0fd5c2eeae Factor out pseudo node creation to a per-topology function - no semantic change right now. 2015-05-27 10:05:18 +00:00
Tom Wilkie
ea6d1282dc Group pseudo nodes by the node the referred to and their address in grouped topologies. 2015-05-27 09:52:04 +00:00
Tom Wilkie
2545ab4670 Group all pseudo nodes from a given host, talking to the same node, together. 2015-05-26 15:58:19 +00:00
Peter Bourgon
2d5f58e8ed Expand details pane 2015-05-22 13:20:00 +02:00
Tom Wilkie
d50e827fd5 Intial commit 2015-05-19 10:02:02 +00:00