aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-testbed/table.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-02-11 10:54:41 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-02-25 18:57:42 +0100
commit8219a518aefc8a87e16ffbec8cd06944a0160032 (patch)
treed08b7981f73262c1664bcdd8a2eb2a1e2fc80d2d /tools/syz-testbed/table.go
parent8135420d02be9c03a0fec5391c3088c978872af6 (diff)
tools/syz-testbed: introduce BoolCell cell type
Diffstat (limited to 'tools/syz-testbed/table.go')
-rw-r--r--tools/syz-testbed/table.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/syz-testbed/table.go b/tools/syz-testbed/table.go
index f8ead50fb..31312ac93 100644
--- a/tools/syz-testbed/table.go
+++ b/tools/syz-testbed/table.go
@@ -35,6 +35,10 @@ type RatioCell struct {
TotalCount int
}
+type BoolCell struct {
+ Value bool
+}
+
func NewValueCell(sample *stats.Sample) *ValueCell {
return &ValueCell{Value: sample.Median(), Sample: sample}
}
@@ -55,6 +59,19 @@ func (c *RatioCell) String() string {
return fmt.Sprintf("%d / %d", c.TrueCount, c.TotalCount)
}
+func NewBoolCell(value bool) *BoolCell {
+ return &BoolCell{
+ Value: value,
+ }
+}
+
+func (c *BoolCell) String() string {
+ if c.Value {
+ return "YES"
+ }
+ return "NO"
+}
+
func NewTable(topLeft string, columns ...string) *Table {
return &Table{
TopLeftHeader: topLeft,