21 Commits

Author SHA1 Message Date
Marcus Cobden
0dfbe8b10f Fix tests broken by hasty merging 2018-05-03 19:27:50 +01:00
Marcus Cobden
8eb9fc86ae Add null checks to fix querier panic 2018-05-03 17:23:58 +01:00
Bryan Boreham
3711876194 Use unsafe merge in joinResults.addChildAndChildren(), for performance 2018-04-15 09:39:21 +00:00
Bryan Boreham
7a03bc03f8 Use faster code to accumulate children when rendering
Make sure all the Children NodeSets are not shared with any other
nodes, then we can use the non-persistent add path.
2018-04-13 07:44:21 +00:00
Matthias Radestock
4dbb913ca2 refactor: remove dead Copy() code 2017-07-04 07:35:30 +01:00
Matthias Radestock
b5f3aa68ae refactor: optimise "empty" case in report set constructors 2017-07-03 01:26:22 +01:00
Matthias Radestock
9dc50b5202 refactor: hide "empty set" constants
They are an implementation detail.
2017-07-03 01:26:22 +01:00
Matthias Radestock
6679c42c0e optimise: don't sort in NodeSet.ForEach
It's unnecessary, and none of the other ps.Map derived structures do
it.
2017-05-30 13:42:18 +01:00
Matthias Radestock
29f2af11d9 introduce mapKeys helper 2017-05-29 14:08:26 +01:00
Matthias Radestock
f09be95a43 use mapEqual where possible 2017-05-29 14:08:26 +01:00
Bryan Boreham
b49ee2ae95 Remove Gob from report package - no longer used 2017-04-25 12:26:15 +00:00
Alfonso Acosta
ecc8a3138f Replace github.com/mndrix/ps by github.com/weaveworks/ps 2016-07-26 10:35:55 +00:00
Paul Bellamy
3d3aed2bb3 Fixing grouped node count for filtered children nodes
Squash of:

* We have to keep all the container hostnames until the end so we can
  count how many we've filtered

* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
  filters

* Because we filter on image name we need the image name before
  filtering

* Alternative approach to passing decorators.

* Refactor out some of the decorator capture

* Don't memoise decorated calls to Render

* Fixing filtered counts on containers topology

  Tricky, because we need the filters to be silent sometimes (when they're
  in the middle), but not when they're at the top, so we take the "top"
  filter's stats. However, this means we have to compose all
  user-specified filters into a single Filter layer, so we can get all
  stats.

  There are no more Silent filters, as all filters are silent (unless they
  are at the top).

  Additionally, I clarified some of the filters as their usage/terminology
  was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
  where IsFoo is true.
2016-04-28 12:23:43 +01:00
Paul Bellamy
2c6b6e6707 Refactoring rendering to remove RenderableNode
Squash of:
- use detailed.Summaries to render topology nodes
- ban merging nodes of different topologies (they should be mapped)
- need to prune parents when mapping node types
- render container images by id if they have no name
- remove separate render ids and prune parents in NewDerived*
- don't render metrics/metadata for groups of nodes
- fixing up tests
- removing pending unit tests (for mapping.go, for now)
- updating experimental dir for RenderableNode removal
2016-03-29 14:13:03 +01:00
Tom Wilkie
f154e7a483 Add connection tables to details panel 2016-03-03 16:17:55 +00:00
Alfonso Acosta
6ac176a492 Remove github.com/2opremio/go-1/codec
* Bump github.com/ugorji/go/codec, to get fixes which make
  github.com/2opremio/go-1/codec unnecessary

* Remove github.com/2opremio/go-1/codec

* Remove type embeddings to avoid the problem explained at
  https://github.com/ugorji/go/issues/141#issuecomment-185450157
2016-02-18 12:47:06 +00:00
Alfonso Acosta
0d917b2d8b Use github.com/ugorji/go/codec/ for wiring messages
* New encoding format:
  * Msgpack reports between probe<->app (smaller representation, faster to
    encode/decode).
  * Still use JSON between app<->UI (try to avoid making javascript deal with
    mspack).

  The app still suports publishing reports in both gob and JSON, not braking
  backwards compatibility.

* Use compile-time generated marshallers/unmarshallers for higher performance. In
  order to be able to skip code-generation for certain types, I included
  https://github.com/2opremio/go-1/tree/master/codec/codecgen instead of
  upstream until https://github.com/ugorji/go/pull/139 is merged.

* Encode/decode intermediate types using github.com/ugorji/go/codec.Selfer
  for higher performance and reducing garbage collection (no temporary buffers).
2016-02-16 06:31:31 +00:00
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
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