summaryrefslogtreecommitdiffhomepage
path: root/pkg/segment/test/BUILD
diff options
context:
space:
mode:
authorReapor-Yurnero <reapor.yurnero@gmail.com>2020-05-20 22:48:41 -0700
committergVisor bot <gvisor-bot@google.com>2020-05-20 22:50:07 -0700
commit059879e14301660c9fce1e5e59bdfaef89fc4aaf (patch)
treec5fff00ceb659fc53f752ebce8c71d5514335541 /pkg/segment/test/BUILD
parent8298c5bd4d1f836ee4c531a7bf04acff05d7099b (diff)
Implement gap tracking in the segment set.
This change was derived from a change by: Reapor-Yurnero <reapor.yurnero@gmail.com> And has been modified by: Adin Scannell <ascannell@google.com> (The original change author is preserved for the commit.) This change implements gap tracking in the segment set by adding additional information in each node, and using that information to speed up gap finding from a linear scan to a O(log(n)) walk of the tree. This gap tracking is optional, and will default to off except for segment instances that set gapTracking equal to 1 in their const lists. PiperOrigin-RevId: 312621607
Diffstat (limited to 'pkg/segment/test/BUILD')
-rw-r--r--pkg/segment/test/BUILD18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkg/segment/test/BUILD b/pkg/segment/test/BUILD
index f2d8462d8..131bf09b9 100644
--- a/pkg/segment/test/BUILD
+++ b/pkg/segment/test/BUILD
@@ -29,10 +29,28 @@ go_template_instance(
},
)
+go_template_instance(
+ name = "gap_set",
+ out = "gap_set.go",
+ consts = {
+ "trackGaps": "1",
+ },
+ package = "segment",
+ prefix = "gap",
+ template = "//pkg/segment:generic_set",
+ types = {
+ "Key": "int",
+ "Range": "Range",
+ "Value": "int",
+ "Functions": "gapSetFunctions",
+ },
+)
+
go_library(
name = "segment",
testonly = 1,
srcs = [
+ "gap_set.go",
"int_range.go",
"int_set.go",
"set_functions.go",