Commit Graph
4407 Commits
Author SHA1 Message Date
Matthias Radestock aaf4e54df2 pass render filters and maps by value rather than reference
They are small and don't carry mutable state, so there is no point
passing them by reference.
2017-11-18 12:10:00 +00:00
Bryan Boreham a375891a4d Merge pull request #2937 from weaveworks/parse-optimisations
Parsing optimisations
2017-11-16 18:22:20 +00:00
Bryan Boreham b9890064c2 Copy net.ParseIP and modify to save memory allocations
Pass in a slice on the stack instead of allocating one on the heap:
reduces garbage, hence makes the program run faster

Also apply knowledge that critbitgo will do an append() with one extra
byte, so we do that allocation up-front too.  This is innocuous should
we stop using critbitgo or should its internals change.
2017-11-15 23:15:55 +00:00
Bryan Boreham e41332a775 In id-parsing functions, Split strings using Index to save allocations
These routines are called a lot, so this change reduces garbage collection
2017-11-15 23:15:10 +00:00
Aaron Kirkbride 2bda044eef Merge pull request #2929 from weaveworks/react-16
Upgrade to React 16
2017-11-15 14:23:27 +00:00
Filip Barl 2df38731a6 Fix some warnings. 2017-11-14 17:26:57 +01:00
Jordan Pellizzari f0888baf8a Merge pull request #2934 from weaveworks/1449-image-details-undefined
Fix undefined image bug
2017-11-14 07:49:46 -08:00
Aaron Kirkbride 848c9bab3c Upgrade to React 16 2017-11-14 13:22:00 +00:00
Filip Barl bf78fc5ba4 Merge pull request #2919 from weaveworks/2823-include-timestamp-in-url
Use timestamp in URL
2017-11-14 14:16:41 +01:00
jpellizzari 723d47170e Fix undefined image bug 2017-11-13 16:43:13 -08:00
Jordan Pellizzari c5bdebdffe Merge pull request #2935 from weaveworks/2697-image-up-to-date
Fix incorrect image status text bug
2017-11-13 16:13:19 -08:00
jpellizzari 85453901d8 Fix incorrect image status text bug 2017-11-13 15:34:43 -08:00
Jordan Pellizzari b281f64ffc Merge pull request #2930 from weaveworks/optional-deps
Remove optional dependencies
2017-11-13 09:09:21 -08:00
Matthias Radestock 7863c3efda Merge pull request #2926 from weaveworks/render-with-stats
produce stats as part of rendering
2017-11-10 23:05:46 +00:00
jpellizzari d684d0d2b0 Remove optional dependencies 2017-11-10 13:31:50 -08:00
Filip Barl 4bd7fc759a Store the pausedAt state in the app URL. 2017-11-10 16:46:56 +01:00
Matthias Radestock 21a91fe9dd remove HostRenderer memoisation
since it was only introduced to because producing stats would hit the
renderer twice, which is no longer the case.
2017-11-08 07:15:28 +00:00
Matthias Radestock 9bd8bd825b remove now superfluous Renderer.Stats method
step 2 (and final step) in producing stats as part of Rendering
2017-11-08 07:15:28 +00:00
Matthias Radestock 8f7e00f46a Stats are easily produced as part of Rendering
...so there is no need for a separate Stats method.

step 1: return stats from Render
2017-11-08 07:15:28 +00:00
Bryan Boreham 893537ca5c Merge pull request #2920 from weaveworks/endpoints-renderers
Optimisation: replace three map-reduces with Renderers
2017-11-07 10:39:10 +00:00
Bryan Boreham 917ef980a4 Memoise HostRenderer
This shows a big improvement in BenchmarkTopologyList
2017-11-07 10:18:27 +00:00
Bryan Boreham ec0689b5aa Code review: improve consistency of naming and ordering 2017-11-06 22:12:13 +00:00
Bryan Boreham 4feb451760 Refactor join-Renderer helper functions as methods
New type joinResult is created to hold the nodes and ID mapping.
The implementation move from host.go to render.go.
2017-11-06 22:12:13 +00:00
Bryan Boreham cbba3c0fd3 Clarify use of 'id' in addToResults
Pass 'id' through to the create function and expect that the result Node has that ID.
Extract a function newPseudoNode for common calls.
2017-11-06 22:12:13 +00:00
Bryan Boreham 322aa76e02 Remove functions which are no longer called 2017-11-06 22:12:10 +00:00
Bryan Boreham cbcb5f19fc Rewrite ProcessRenderer/MapEndpoint2Process as a single Renderer
This is much more efficient as we skip creating then merging all intermediate Nodes
2017-11-06 22:06:29 +00:00
Bryan Boreham 77a8cac65a Use helper to add result nodes in endpoints2Hosts.Render
This means we are no longer generating a Counter for the number of
endpoint sub-nodes, but it seems that data was not used.
2017-11-06 22:05:05 +00:00
Bryan Boreham e16aaf6c43 Merge nodeToIP, endpoints2Nodes and ipToNode into one Renderer
This is much more efficient as we skip creating then merging all intermediate Nodes
2017-11-06 22:05:05 +00:00
Bryan Boreham b684e3c6fc Rewrite MapEndpoint2Host as a Renderer
This allows us to avoid creating a host of 'IP' type Nodes then
discarding them after matching; instead we match directly and create
just the result we want.
2017-11-06 22:05:05 +00:00
Bryan Boreham 1b3e40ccb5 Refactor: extract pseudoNodeID function 2017-11-06 22:04:59 +00:00
Bryan Boreham d230846b95 Refactor: extract externalNodeID function 2017-11-06 20:55:57 +00:00
Bryan Boreham 8a11697957 Add BenchmarkTopologyHosts() and BenchmarkTopologyContainers()
To time a single topology, for more focused optimisation
2017-11-06 20:48:25 +00:00
Filip Barl 119bbab4fe Merge pull request #2915 from weaveworks/2875-humanize-durations
Humanize reported durations
2017-11-06 14:11:45 +01:00
Matthias Radestock b3669bee84 Merge pull request #2924 from weaveworks/2923-memoise-less
remove unused memoisation

Fixes #2923
2017-11-06 10:35:22 +00:00
Bryan Boreham c52b5f69e7 Merge pull request #2921 from weaveworks/optimise-dnsnames
Avoid object creation when scanning DNS names
2017-11-06 09:59:48 +00:00
Matthias Radestock 7b0a08ae9d memoise renderer passed to ConnectionJoin
We do this here rather than in ConnectionJoin since that way it is
obvious that the renderer isn't memoised already.
2017-11-05 11:05:28 +00:00
Matthias Radestock 5f4f9da4df memoise a few more shared renderers 2017-11-05 00:21:45 +00:00
Matthias Radestock b793a9efa8 memoise shared top-level renderers
and add a comment indicating non-memoisation of other, not shared
top-level renderers.

This memoisation is effective when the browser requests multiple
topologies for the same report.
2017-11-04 23:05:52 +00:00
Matthias Radestock 0b9bab255c memoise top-level rendering
This deals with browsers requesting the same rendering for the same
timespan when no new reports have been received for that timespan.
2017-11-04 22:24:46 +00:00
Matthias Radestock 2bdab7513e ditch all memoisation
we will re-introduce it more selectively later
2017-11-04 22:21:50 +00:00
Bryan Boreham 6aab6ced5a Merge pull request #2918 from weaveworks/ecs-crash-less
Don't de-reference pointers from AWS without checking
2017-11-04 20:33:49 +00:00
Bryan Boreham 800979a089 Avoid object creation when scanning DNS names
Since we do this a lot, scanning the lists in-place saves time.
Also we don't need to sort them since StringSet is implemented as a
sorted set of strings
2017-11-04 17:37:04 +00:00
Bryan Boreham ca9351553c Fix ECS stack configuring link 2017-11-03 10:24:43 +00:00
Filip Barl e233e64279 Improved the duration parsing on frontend. 2017-11-03 10:43:41 +01:00
Filip Barl f5bfa506d6 Verified the TODO comments and make durations be in seconds. 2017-11-03 10:43:41 +01:00
Filip Barl 320b9e240f Abstracted the report data types. 2017-11-03 10:43:41 +01:00
Filip Barl 6c0194b832 Show uptime durations in a more human format. 2017-11-03 10:43:41 +01:00
Damien Lespiau 78152d0ac2 Merge pull request #2917 from tklauser/utsname-x-sys
Simplify Utsname string conversion
2017-11-02 11:59:18 +00:00
Tobias Klauser 89f3ce2e64 Simplify Utsname string conversion
Use Utsname from golang.org/x/sys/unix which contains byte array
instead of int8/uint8 array members. This allows to simplify the string
conversions of these members and the marshal.FromUtsname functions are
no longer needed.
2017-11-02 08:45:54 +01:00
Bryan Boreham a082c28919 Don't de-reference pointers from AWS without checking 2017-11-01 14:52:50 +00:00