Commit Graph
17 Commits
Author SHA1 Message Date
Bryan Boreham b085c80ef3 Decode via byte slice for memcache and file read
This is more efficient, since the decoder can read field names in-place.
It also appears to be absolutely faster.
2017-03-14 14:54:17 +00:00
Matthias Radestock 56892addfc quantise reports
Merge all reports received within a specified interval, discarding the
originals. This improves performance of Report() on repeated
invocation since it ends up merging fewer reports.

For example, if reports are received every second (e.g. 3 probes
reporting at the default probe.publishInterval of 3s), and the
app.windows is 15s (the default) and the report generation interval is
5s (e.g. one UI accessing every TOPOLOGY_INTERVAL; the default), then
the original code would have to merge 15 reports per UI access,
whereas this code will only need to merge 8 to 9 reports (3-4 merged
reports from previous invocation plus 5 recently received reports).
2017-03-06 10:33:03 +00: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
Jonathan Lange e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Tom WilkieandGitHub 32edfc9112 Don't reencode reports in the collector (#1819)
* Don't reencode reports in the collector

* Review feedback

* Fix comment

* Update alpine URLs so it will build

* Fix tests
2016-08-22 17:37:41 +01:00
Krzesimir Nowak 0ecb908c22 Ensure backward compatilibity in report's node controls
The new probe will convert all node's LatestControls to Controls, so
the old app can consume them. Also, the new app will convert all
node's Controls to LatestControl, so it can consume the reports from
old probes.
2016-08-12 17:15:43 +02:00
Paul Bellamy 7a37577f71 Review Feedback 2016-07-11 13:36:22 +01:00
Paul Bellamy bcddfd82c3 Added file collector, to serve a static report from file 2016-07-11 11:50:27 +01:00
Tom Wilkie 54a760a56d Log(n) complexity report merger. 2016-05-04 17:53:09 +01:00
Tom Wilkie e2cb836272 Correctly expire the cache in the collector 2016-04-13 11:29:53 +01:00
Tom Wilkie b4739af279 Refactoring for multitenancy 2016-03-09 13:48:28 +00:00
Tom Wilkie 5f7f74bf1b Refactor app for multitenancy
- Add interfaces to allow for alternative implementations for Collector, ControlRouter
  and PipeRouter.
- Pass contexts on http handlers to these interfaces.  Although not used by the current
  (local, in-memory) implementations, the idea is this will be used to pass headers to
  implementations which support multitenancy (by, for instance, putting an authenticating
  reverse proxy in form of the app, and then inspecting the headers of the request for
  a used id).
2016-02-22 14:54:04 +00:00
Tom Wilkie 8af839ce26 Cache reports generated by the collector. 2016-01-26 16:31:31 -08:00
Tom Wilkie 57f5a8bb04 Make the collector's report IDs a hash of the merged in report. 2016-01-26 16:03:34 -08:00
Tom WilkieandTom Wilkie c317cff86e App: Rename package main->app, put main.go in prog/app 2015-12-07 14:53:28 +00:00
Tom Wilkie 47ef1e02b3 Shortcut app -> UI ws push for certain reports. 2015-11-10 13:46:57 +00:00
Paul Bellamy 9ea156cfef Moving xfer.Collector into App (the only place its used) 2015-11-05 11:31:48 +00:00