Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
shorten json output
  • Loading branch information
Oppodelldog committed Sep 22, 2019
1 parent 45b4ca5 commit 43ddaac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/ex1/VariantA.json
@@ -1 +1 @@
[{"N":1,"OMeasures":[{"ResultValue":null,"O":100}]},{"N":2,"OMeasures":[{"ResultValue":null,"O":200}]},{"N":3,"OMeasures":[{"ResultValue":null,"O":300}]}]
[{"N":1,"M":[{"V":null,"O":100}]},{"N":2,"M":[{"V":null,"O":200}]},{"N":3,"M":[{"V":null,"O":300}]}]
2 changes: 1 addition & 1 deletion examples/ex1/VariantB.json
@@ -1 +1 @@
[{"N":1,"OMeasures":[{"ResultValue":null,"O":200}]},{"N":2,"OMeasures":[{"ResultValue":null,"O":400}]},{"N":3,"OMeasures":[{"ResultValue":null,"O":600}]}]
[{"N":1,"M":[{"V":null,"O":200}]},{"N":2,"M":[{"V":null,"O":400}]},{"N":3,"M":[{"V":null,"O":600}]}]
8 changes: 4 additions & 4 deletions result.go
Expand Up @@ -5,20 +5,20 @@ type OMeasure struct {
// ResultValue may be used to store result values of the tested logic.
// It is not used by this library, it's intention is debugging:
// If those are deterministic they could be used to cross check that the tested code worked as expected.
ResultValue interface{}
ResultValue interface{} `json:"V"`
// O represents the number of operations used by the tested program.
// Determining this value could be from tricky to impossible.
// For a per machine comparison this could also be the duration of the logic under test.
O float64
O float64 `json:"O"`
}

// OMeasures contains multiple instances of OMeasure
type OMeasures []OMeasure

// Result is used by the library to accumulate OMeasure results per N
type Result struct {
N float64
OMeasures OMeasures
N float64 `json:"N"`
OMeasures OMeasures `json:"M"`
}

// Results contains multiple instances of Result
Expand Down

0 comments on commit 43ddaac

Please sign in to comment.