Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

static stat analysis #73

Merged
merged 4 commits into from
Jun 20, 2016
Merged

static stat analysis #73

merged 4 commits into from
Jun 20, 2016

Conversation

CorgiMan
Copy link
Contributor

Part 1 for the cluster-test-orchestrator. One file contains the logic to scan a window of a file containing ringpop stats inserted with labels that indicate when the commands of a script are run. The other file contains analysis for: convergence time; number of converged checksums; counting of individual stats.

For reference, here is a small sample of what such a stat file would look like.

2016-06-16T16:22:57.795666563Z|ringpop.172_18_24_214_3000.make-alive:1|c
2016-06-16T16:22:57.795735453Z|ringpop.172_18_24_214_3000.membership-update.alive:1|c
2016-06-16T16:22:57.795883314Z|ringpop.172_18_24_214_3000.compute-checksum:0.016676|ms
2016-06-16T16:22:57.795897982Z|ringpop.172_18_24_214_3000.checksum:1565761574|g
2016-06-16T16:22:57.795919548Z|ringpop.172_18_24_214_3000.membership.checksum-computed:1|c
2016-06-16T16:22:57.795931518Z|ringpop.172_18_24_214_3000.changes.apply:1|g
2016-06-16T16:22:57.796057927Z|ringpop.172_18_24_214_3000.ring.checksum-computed:1|c
2016-06-16T16:22:57.796070776Z|ringpop.172_18_24_214_3000.ring.checksum:3321709178|g
2016-06-16T16:22:57.796082369Z|ringpop.172_18_24_214_3000.ring.server-added:1|c
2016-06-16T16:22:57.796091444Z|ringpop.172_18_24_214_3000.ring.server-removed:0|c
2016-06-16T16:22:57.796109218Z|ringpop.172_18_24_214_3000.ring.changed:1|c
2016-06-16T16:22:57.796119814Z|ringpop.172_18_24_214_3000.membership-set.alive:1|c
2016-06-16T16:22:57.796256752Z|ringpop.172_18_24_214_3000.updates:1|c
2016-06-16T16:22:57.796293995Z|ringpop.172_18_24_214_3000.max-piggyback:0|g

@motiejus
Copy link
Contributor

Can you write unit tests?

Also, it's unclear how labels work. Looking at the code I see it, but it's neither in documentation of the pull request, nor there is a comment in the file.

Also, for every file, can you add a high-level summary on it's purpose, possibly examples?

I agree unit tests are not very visual, so it can be hard justification for this task. However, with doctest-style examples we could achieve two benefits: code snippets which show the functionality, and unit-like tests at the same time.

Thoughts?

@severb
Copy link
Contributor

severb commented Jun 17, 2016

@motiejus I feel like testing the testing tool is maybe too much hustle?

This was referenced Jun 17, 2016
@motiejus
Copy link
Contributor

@severb I thought about it too, in this case, testing is not to assert correctness, but maintainability.

This is not a one-off code; I believe we will augment it and it will evolve. And having test + documentation (like discussed, can be in one!) will really save us a lot of time in the future.

@@ -18,6 +18,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

// A SectionScanner wraps a scanner and filters out all data before the start-
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@motiejus
Copy link
Contributor

I really love your new tests. LGTM.

CorgiMan added a commit that referenced this pull request Jun 20, 2016
This PR contains the implementation of the measurement and assertion structs.

The Measurement struct has a method called Measure which makes calls to the static analysis function in PR #73
In this PR you find the stat ingester of the orchestrator. The stat ingester does real-time analysis to find out if the ringpop cluster is stable and writes the stats to a file for later analysis.
@CorgiMan CorgiMan merged commit 6e9246d into master Jun 20, 2016
@CorgiMan CorgiMan deleted the ws-stat-analysis branch June 20, 2016 15:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants