Similar to video compression which uses key-frames and differences
between them: every N publishes we send a full report, but inbetween
we only send what has changed.
Fairly simple approach in the probe - hold on to the last full report,
and for the deltas remove anything that would be merged in from the
full report.
On the receiving side in the app it already merges a set of reports
together to produce the final output for rendering, so provided N is
smaller than that set we don't need to do anything different.
Deltas don't need to represent nodes that have disappeared - an
earlier full node will have that node so it would be merged into the
final output anyway.
If we run out of things to look at in the other map, return quickly.
Also move the equal-key case above the less-than case, since maps with
equal keys are the common case when merging.
Fixing a rare case that came up in a test. In order for this to cause
a problem, the data being decoded has to have entries out of order,
and have a value that is nil or omitted.
Most maps we merge have the same keys, or at least one set of keys is
the subset of the other. Therefore, allocate a result slice capable of
holding only the max of number keys, rather than the sum.
Symptoms:
```
extras/dialer/time-scope-probe-cgroup:31:18: arithmetic expressions must consist of names and numbers
extras/dialer/time-scope-probe-cgroup: run shfmt -i 4 -w extras/dialer/time-scope-probe-cgroup
extras/dialer/time-scope-probe-proc:28:18: arithmetic expressions must consist of names and numbers
extras/dialer/time-scope-probe-proc: run shfmt -i 4 -w extras/dialer/time-scope-probe-proc
extras/in_parallel.sh:29:16: arithmetic expressions must consist of names and numbers
extras/in_parallel.sh: run shfmt -i 4 -w extras/in_parallel.sh
```
Visible on https://circleci.com/gh/kinvolk/scope/980
* remove randomness as far as possible
* make listener to close connections
* report time in a csv-friendly format
* remove tools from README
* rename time-scope-probe -> time-scope-probe-proc
* add time-scope-probe-cgroup
Structs like StringLatestMap now use ps.Map directly, which saves
a memory allocation for LatestEntry.Value to point to.
The values in the ps.Map are now pointers, which saves a memory
allocation indirecting a value type to an interface{}
The find command fails on circleci running ubuntu 14.04 with the
following message:
Unix filenames usually don't contain slashes (though pathnames do).
That means that '-name `./*.go'' will probably evaluate to false all the
time on this system. You might find the '-wholename' test more useful,
or perhaps '-samefile'. Alternatively, if you are using GNU grep, you
could use 'find ... -print0 | grep -FzZ `./*.go''.'
This fix is compatible with ubuntu 12.04
This regression is caused by
https://github.com/weaveworks/scope/pull/2068/files#diff-3072c24bd91fea6eb71aecc590951d7e
`extras/dialer` contains both a dialer script and dialer.go, the go
sources for the dialer server and client, to allow users to build the
dialer container themselves. Move dialer.go to a sub directory `src`
since `make clean` (running `go clean ./...`) deletes the dialer script
otherwise.
Fixup for 4d20a91a97
Signed-off-by: Michael Schubert <michael@kinvolk.io>
Also:
- Parse targets on startup and catch badly formed ones before Scope can start.
- If no port is specified, use default port for scheme; if no scheme is specificed, use 4040.
- Use username as probe token
* circle.yml: deploy master with non-upstream hub accounts
Since b4abe582f4, images are tagged on
Docker Hub. But this was not working for non-upstream Docker Hub
accounts. This patch should fix that.
Symptoms: https://circleci.com/gh/kinvolk/scope/23
> The push refers to a repository [docker.io/kinvolk/scope] (len: 1)
> error getting tags for kinvolk/scope: Tag does not exist for
> master-b89e9ec
Also, ensure that the Docker tag name does not include any '/'.
Symptoms: https://circleci.com/gh/kinvolk/scope/24
> docker tag weaveworks/scope weaveworks/scope:alban/hub1-ef739d9
> repository name component must match "[a-z0-9]+(?:[._-][a-z0-9]+)*"
* extras/in_parallel.sh: ensure unique schedule name
Use CircleCI environment variables as documented on:
https://circleci.com/docs/environment-variables/
Symptoms:
> $ cd $SRCDIR/extras; ./build_on_circle.sh
> Doing graphviz/graphviz
> make: *** No rule to make target `graphviz/graphviz'. Stop.
See: https://github.com/weaveworks/scope/pull/1655#issuecomment-232696357
* circle.yml: separate wcloud deployment
Do not run wcloud for non-weaveworks builds, as suggested by
https://github.com/weaveworks/scope/pull/1655#discussion_r71179373