Commit Graph

30 Commits

Author SHA1 Message Date
Matthias Radestock
286453b9a9 refactor: move RenderContext where it belongs
It shouldn't be in 'report' because that is shared between the probe
and the app, and RenderContext, as the name suggests, is only needed
in the app.
2017-12-27 16:22:52 +00:00
Matthias Radestock
a9e5b99a74 add benchmarks for rendering & summarising processes-by-name 2017-12-26 11:59:50 +00:00
Matthias Radestock
f4668ca692 add benchmarks for report summarization
This is the last phase before result marshalling in the
/api/topology/{name} handler.
2017-12-24 09:48:41 +00:00
Matthias Radestock
06e0bed015 refactor: extract helper for rendering a topology 2017-12-24 09:44:48 +00:00
Matthias Radestock
6784d95ac8 refactor: extract getting report for benchmarking 2017-12-24 09:18:20 +00:00
Matthias Radestock
d4d7764311 cosmetic(ish) 2017-12-24 09:13:22 +00:00
Matthias Radestock
bf14b3dafd upgrade reports we merge / render
This better reflects what the app is doing.
2017-12-24 08:55:45 +00:00
Matthias Radestock
615cb6af59 simplify error handling 2017-12-24 08:43:24 +00:00
Matthias Radestock
794c345aee cosmetic: more logical function order 2017-12-24 08:33:13 +00:00
Matthias Radestock
49e4c7b0b6 make report upgrade benchmark reflect new phasing
Since #2979 upgrading happens prior to merging.
2017-12-24 08:29:37 +00:00
Matthias Radestock
43fadceb85 cosmetic: better function grouping 2017-12-24 08:18:12 +00:00
Matthias Radestock
ad72a2cf2f refactor: rename topology rendering benchmarks 2017-12-24 08:16:57 +00:00
Matthias Radestock
ea20de58be Merge pull request #2964 from weaveworks/do-not-reportallocs
do not report allocations in benchmarks
2017-12-08 14:11:18 +00:00
Matthias Radestock
d528292cd4 make report upgrading fast when it's a no-op
The vast majority of the cost is memory allocation, so doing a first
pass to see whether any upgrading is necessary at all, and thus
avoiding allocation when it isn't, is a massive saving.
2017-12-07 21:01:34 +00:00
Matthias Radestock
d3e23e18fc do not start/stop benchmark timer for no-ops 2017-12-07 20:31:11 +00:00
Matthias Radestock
f305c35bfd do not report allocations in benchmarks
That's what -benchmem is for.
2017-12-07 20:27:31 +00:00
Matthias Radestock
acde0ea294 add some more topology rendering benchmarks 2017-12-02 13:04:57 +00:00
Matthias Radestock
bc0c8324be add report merging benchmark 2017-12-02 11:51:16 +00:00
Matthias Radestock
c953313b01 move main report processing benchmarks in one place
so they can share code and are easier to run in combination.

We take advantage of the code sharing by generalising the report
rendering benchmarks to read & merge reports from a dir.
2017-12-02 11:29:16 +00:00
Matthias Radestock
f2fed067d5 simplify render benchmark code
by using report.MakeFromFile instead of NewFileConnector
2017-11-29 11:37:39 +00:00
Matthias Radestock
88e8b52d66 Decorators, begone!
Decorators were just a complicated way of constructing filters.
2017-11-21 20:16:30 +00:00
Matthias Radestock
a82d245e93 simplify render decoration
Decoration is in fact quite a simple process that is applied on entry
to rendering: we take a base renderer, transform it with a decorator,
and then render a report with it. The new render.Decorate() function
does exactly that.

There is one exception. When rendering an individual node, e.g. for
showing its details panel in the UI, we must not lose the node during
decoration. That requires some special logic, which previously resided
in the PreciousNodeRenderer, and now lives in handleNode.
2017-11-18 18:04:52 +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
b6dfe25499 Time travel control (#2524)
* Hacky working prototype.

* Operate with time.Duration offset instead of fixed timestamp.

* Polished the backend code.

* Made a nicer UI component.

* Small refactorings of the websockets code.

* Fixed the backend tests.

* Better websocketing and smoother transitions

* Small styling refactoring.

* Detecting empty topologies.

* Improved error messaging.

* Addressed some of David's comments.

* Moved nodesDeltaBuffer to a global state to fix the paused status rendering bug.

* Small styling changes

* Changed the websocket global state variables a bit.

* Polishing & refactoring.

* More polishing.

* Final refactoring.

* Addressed a couple of bugs.

* Hidden the timeline control behind Cloud context and a feature flag.

* Addressed most of @davkal's comments.

* Added mixpanel tracking.
2017-06-12 11:22:17 +02:00
Matthias Radestock
289b4c63af report playback
Now you can launch the scope app with something like

./prog/scope --mode=app --weave=false --app.collector=file:///tmp/reports

and if the specified dir contains reports with filenames in the form
<timestamp>.{msgpack|json}[.gz],
e.g. "1488557088545489008.msgpack.gz", then these reports are replayed
in a loop at a sequence and speed determined by the timestamps.
2017-03-04 22:04:50 +00:00
Paul Bellamy
bcddfd82c3 Added file collector, to serve a static report from file 2016-07-11 11:50:27 +01:00
Paul Bellamy
0379fc4cf3 generate an ID for each memoiser so they can share cache
Makes cache clearing easier, and then we don't need to add
`ResetCache()` to the Renderer interface.
2016-02-17 17:10:14 +00:00
Paul Bellamy
a0a60ca079 Remove pointer math (comparison) from render caching, as it is unreliable 2016-02-17 15:41:16 +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
Tom Wilkie
0e3e3b74f8 Add benchmark for list topologies API. 2016-01-25 21:48:18 -08:00