Commit Graph
302 Commits
Author SHA1 Message Date
Alfonso Acosta 8a950a59d6 Remove Metric Add() method
* Helps reduce garbage (MakeMetric() now takes a slice and there's a shorter version MakeSingletonMetric())
* Fixes bug computing Max (Min) in samples since using MakeMetric()
  was causing a default Max/Min of zero.
* Simplifies code a bit
2016-08-01 16:58:11 +00:00
Alfonso Acosta 3e000662f4 Restore custom encoders/decoders for backwards compatibility 2016-08-01 11:07:03 +00:00
Alfonso Acosta b8bf60c6f1 Use slices instead of linked lists for Metric
Also:

* Remove Gob encoder/decoder
* Stop using custom encoders/decoders for Timestamps (both ugorji and the Golang JSON codecs use nanosecond precision).
* Use idiomatic way to check for existence in metric.LastSample()
2016-08-01 10:21:57 +00:00
Matthias Radestock 15cf1e16b2 micro optimisation: avoid some unnecessary copying 2016-07-29 18:56:06 +01:00
Matthias Radestock 17fe25d8c3 shallow-copy instead of (deep) Copy() in Merge()
Merge() must not modify self or other; shallow-copying is sufficient
to achieve that.
2016-07-29 10:00:01 +01:00
Matthias Radestock c4fa72110c don't Copy() self on Merge()
Merge() is always returning a copy, so there is no need to Copy()
struct fields first before calling Merge() on them.

This reduces GC pressure (#1010) and helps overall app performance
(#1457).
2016-07-28 22:21:06 +01:00
Alfonso Acosta b5c488faec Fix tests 2016-07-26 10:55:22 +00:00
Alfonso Acosta a80429ded2 LatestMap codec performance improvements and cleanups
* Allocate all map entries of the intermadiate representation at once
* Use UnsafeMutableMap to improve performance of LatestMap construction
* Remove gob encoder/decoder
2016-07-26 10:35:56 +00:00
Alfonso Acosta ecc8a3138f Replace github.com/mndrix/ps by github.com/weaveworks/ps 2016-07-26 10:35:55 +00:00
Tom WilkieandGitHub 78199aa25f Custom encoder for latest maps (#1709)
* Customer encoder for latest maps

- Cuts out intermediate type
- Should be backwards compatible with existing reports.

* Make it build cleanly

* Review feedback
2016-07-21 16:19:57 +01:00
Jonathan Lange 2bfd6d7eb7 Parametrize compression level 2016-07-15 11:24:36 +01:00
Jonathan Lange e4c75e6223 Test for marshalling 2016-07-14 18:06:10 +01:00
Bryan Boreham 7d579122aa Use a slice instead of a persistent list for temporary accumulation of lists
Avoids creating O(n) garbage by using a slice with enough capacity to
hold the temporary head-portion of the list accumulated while walking
the list to insert element(s).
2016-07-11 11:18:07 +01:00
Alfonso Acosta 6175880725 Review feedback 2016-07-05 10:47:57 +00:00
Jonathan Lange 23faf583b3 Drop gob support 2016-06-21 11:56:56 +01:00
Jonathan Lange 8bd8f883a1 Restore debugging logic 2016-06-21 11:08:55 +01:00
Jonathan Lange e5417342ba Review comments 2016-06-21 10:33:15 +01:00
Jonathan Lange 81b05a33ee Make ReadBinary more general and re-use in router 2016-06-20 18:02:23 +01:00
Jonathan Lange 13269e8110 Helper for reading & writing from binary 2016-06-17 15:24:33 +01:00
Tom WilkieandGitHub fba555c985 Use image name without version as id. (#1531)
* Use image name without version as id.

* Review feedback
2016-06-15 16:14:51 +01:00
David Kaltschmidt 645f2ca9f4 Add hint that a section may be truncated 2016-05-11 13:05:19 +02:00
Alfonso Acosta 100f78d771 Provide truncation counts to the UI 2016-05-11 01:22:33 +00:00
Alfonso Acosta 7a8e61454f Limit tables to 20 rows 2016-05-10 14:46:24 +00:00
Paul BellamyandTom Wilkie 291c9afe58 Add scale up/down controls on deployments, replica sets, and replication controllers (#1451) 2016-05-10 12:43:52 +02:00
Paul Bellamy 52c2498373 adding benchmark for LatestMap.Merge 2016-05-10 10:48:54 +01:00
Paul Bellamy 16a5c738d9 Deployment and ReplicaSet views for k8s 2016-05-09 09:03:57 +01:00
Paul Bellamy 0178babb0e Index services by UID, and refactor out common k8s metadata handling 2016-05-09 09:03:56 +01:00
Tom Wilkie 1c5f0ac041 Don't attribute conntracked connections to k8s pause containers. 2016-05-03 12:04:08 +01:00
Tom Wilkie 8395c3ca4b Index Pods by UID and join with containers based on this. 2016-05-03 11:51:51 +01:00
Tom Wilkie 02554b1dcd Propagate network info for containers sharing network namespaces (#1401)
- Add armon/go-radix library, use this to find containers by prefix
- Deal with host net namespace in the same way
2016-04-29 18:13:55 +01:00
Paul Bellamy 64450a4830 Merge pull request #1371 from weaveworks/1219-grouped-node-counts-2
Fixing grouped node count for filtered children nodes
2016-04-28 13:30:15 +01: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
Tom Wilkie b05ef74552 Report hostname and version in probe struct, and version in host node. 2016-04-26 09:25:15 +01:00
Paul Bellamy e7ebb83e23 Prune is only used in tests, so let's move it there 2016-04-22 14:14:30 +01:00
Tom Wilkie 8b06f6c0d8 Add rank field to controls. 2016-04-21 18:05:48 +01:00
Tom Wilkie 99204e1ff7 Add k8s pod log control (#1298)
* Remove individually vendored k8s.io/kubernetes/pkg/<foo>

* Vendor the whole of vendor/k8s.io/kubernetes/pkg

* Add k8s pod log control

* Tag pods with host id and include them in the host topology as children.

* adding a basic test for kubernetes.Reporter.GetLogs
2016-04-21 13:48:50 +01:00
Paul Bellamy 4bd3832219 move counting sublabel definition to the topologies 2016-04-20 12:17:46 +01:00
Paul Bellamy 4ad1ae80df move shapes determination to the topology 2016-04-20 12:17:46 +01:00
Tom Wilkie 9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00
Paul BellamyandTom Wilkie 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
Paul Bellamy f211d48cda Merge pull request #1126 from weaveworks/plugins
Plugins
2016-04-12 18:03:26 +01:00
Paul Bellamy 7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
Tom Wilkie 281ba58845 Add /api/probes endpoint 2016-04-12 17:17:18 +01:00
Paul Bellamy fe6203fd3f Review Feedback
Squash of:
- including children in topologies_test.go
- report.Node.Prune should prune children also
- rewrote ShortLivedInternetConnections test to express its intent
- adding tests for detail Summary rendering
2016-03-29 14:13:20 +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
Paul Bellamy 30b81a581b adding tests for report.Counters.String 2016-03-29 14:00:12 +01:00
Tom Wilkie 7e2e4c9c45 Fix spelling mistakes in the codebase. 2016-03-23 10:51:27 +00:00
Tom Wilkie e7c5fc7016 Remove address topology 2016-03-08 13:23:30 +00:00
Tom Wilkie f154e7a483 Add connection tables to details panel 2016-03-03 16:17:55 +00:00
Tom Wilkie 28a0dd9d76 Fix for new go1.6 lint rules. 2016-03-01 13:01:19 +00:00