Commit graph

65 commits

Author SHA1 Message Date
Ben Johnson
ca29f7692b
Fix failing tests when IPv6 is disabled.
Turning off IPv6 causes the tests to fail because the Go
`net.Listen()` function obtains a `[::]` address when using
a `localhost:0` bind address. Looking through the Go source
code, I don't see a good way to fix that.

This change adds a test flag to allow users to specify the
network name when running the test:

```sh
go test github.com/pilosa/pilosa/server -network tcp4
```
2017-06-01 14:43:59 -06:00
Matthew Jaffee
fa4234b04c Merge pull request #590 from jaffee/set-n-at-end
set n based on array length instead of incrementing repeatedly
2017-06-01 11:03:35 -05:00
Todd Gruben
542d748baf corrected tests to no longer use String method 2017-06-01 10:17:49 -05:00
Todd Gruben
ba2b8cd5b1 removed String method upon discovery of %v 2017-06-01 10:03:23 -05:00
Travis
879e02de81
fix misspelling and run gofmt 2017-05-31 16:22:43 -05:00
Todd Gruben
f584400330 attempt to conquer weird 2017-05-31 16:10:48 -05:00
Todd Gruben
e12fdb69a1 better String() 2017-05-31 15:04:33 -05:00
Todd Gruben
7382428f38 clensed String method;added documentation for tests 2017-05-31 15:01:48 -05:00
Todd Gruben
649e58253a corrected flip prefix;changed flip to inclusive 2017-05-31 13:58:54 -05:00
Todd Gruben
a6975192d6 Merge branch 'flip' of github.com:tgruben/pilosa into flip 2017-05-31 10:55:31 -05:00
Todd Gruben
aa13bbb6ce cleaned up comments 2017-05-31 10:40:52 -05:00
tgruben
a58206bb4d Merge branch 'master' into flip 2017-05-31 08:43:50 -05:00
tgruben
8c5c48bba9 Merge pull request #571 from tgruben/xor
added xor support to roaring
2017-05-31 08:34:58 -05:00
Matt Jaffee
56ba127210 set n based on array length instead of incrementing repeatedly 2017-05-30 16:09:02 -05:00
Todd Gruben
1c468fb38e bitmap container xor empty test 2017-05-30 15:07:10 -05:00
Todd Gruben
b5bd8433cc added empty and equivlence testing 2017-05-30 13:27:11 -05:00
Todd Gruben
7090ee4d7a @jaffee cleanup 2017-05-30 12:39:23 -05:00
Todd Gruben
498045f25a added copy optimization ; type check; and code cleanup 2017-05-30 11:18:05 -05:00
Todd Gruben
aa713e3832 add support for bit flip (negate) in roaring 2017-05-25 10:07:29 -05:00
Matt Jaffee
da961be614 rewrite intersectCountArrayBitmap for perf test 2017-05-24 12:38:50 -05:00
Todd Gruben
2182534cc7 added xor support to roaring 2017-05-22 16:51:53 -05:00
Matt Jaffee
e90e1455db remove branch and always count last container 2017-05-22 10:38:40 -05:00
Matt Jaffee
6b3b459659 add license to roaring_internal_test 2017-05-22 09:46:52 -05:00
Matt Jaffee
a5918d01d9 fix offset check to make sense 2017-05-19 17:09:22 -05:00
Matt Jaffee
c0ddbe0e3f fix bitmapCountRange and test
had been thinking that index 0 was the most significant bit, but based on the
bitmapAdd function, it must be the least significant bit
2017-05-19 15:18:07 -05:00
Matt Jaffee
fb4651cdb8 fix 3 separate bugs in bitmapCountRange
in order of the diff:

1. When the start and end of the range fall in the same word, special handling
is needed to "mask" off the beginning and end of the word simultaneously to
avoid counting bits at the beginning or end of the word that aren't in the
range.

2. `i++` is needed at the end of the first partial word to avoid counting this
word in the next block.

3. the shift amount for right shifts is 64 - (end % 64) rather than just end
% 64. If end is (e.g.) 68, then 68 - 64 is 4 and we are only interested in the
first 4 bits of the word, so we must right shift by 60 bits, not 4 bits.
2017-05-18 12:04:37 -05:00
Todd Gruben
fbae0f4d15 asm build options for non amd64 2017-05-15 11:31:41 -05:00
Damian Gryski
62d6edd1ca roaring: fix vet issues with the assembly code
assembly_amd64.s:3: [amd64] hasAsm: wrong argument size 0; expected $...-1
assembly_amd64.s:11: [amd64] POPCNTQ: wrong argument size 8; expected $...-16
assembly_amd64.s:12: [amd64] POPCNTQ: unknown variable x; offset 0 is memory+0(FP)
assembly_amd64.s:17: [amd64] BSFQ: wrong argument size 8; expected $...-16
assembly_amd64.s:18: [amd64] BSFQ: unknown variable x; offset 0 is memory+0(FP)
assembly_amd64.s:28: [amd64] popcntSliceAsm: invalid offset s+8(FP); expected s+0(FP), s_base+0(FP), s_len+8(FP), or s_cap+16(FP)
assembly_amd64.s:43: [amd64] popcntMaskSliceAsm: invalid offset s+8(FP); expected s+0(FP), s_base+0(FP), s_len+8(FP), or s_cap+16(FP)
assembly_amd64.s:63: [amd64] popcntAndSliceAsm: invalid offset s+8(FP); expected s+0(FP), s_base+0(FP), s_len+8(FP), or s_cap+16(FP)
assembly_amd64.s:82: [amd64] popcntOrSliceAsm: invalid offset s+8(FP); expected s+0(FP), s_base+0(FP), s_len+8(FP), or s_cap+16(FP)
assembly_amd64.s:101: [amd64] popcntXorSliceAsm: invalid offset s+8(FP); expected s+0(FP), s_base+0(FP), s_len+8(FP), or s_cap+16(FP)
2017-05-04 11:01:10 +02:00
Travis
ea4bf0a1d3
Fix roaring test: TestBitmap_Quick_Array1
When the random number generator was coming up 0,
then `a = []uint64{}`. This caused the bitmap `bm` to be empty.
In this case, `bm.Slice()` is a nil slice, while the expected
slice is an empty slice (i.e. they are not considered equal):
got: ([]uint64) <nil>
exp: ([]uint64) {}
2017-04-29 18:04:59 -05:00
Cody Soyland
3996b56b88 Apply Apache License 2.0 2017-04-28 14:22:03 -05:00
Travis
c3ed12c20e Refactor fragment.bitmap() so that it leverages bitmapCache and so that
it's no longer reponsible for updating the count cache.
This commit also helps SetBit/ClearBit performance by allowing them
to work against data from `bitmapCache` instead of loading bitmaps
from fragment.storage every time.
2017-03-06 11:06:22 -06:00
Todd Gruben
43ede4d9c8 WIP increase caching and topn adjustments 2017-02-21 09:28:01 -06:00
Todd Gruben
e62bd5fad5 WIP snapshot optimization 2017-02-16 15:43:27 -05:00
Travis
1e816b401c Adds Todd's performance improvements:
- Ingore asserts in fragment container.
- Only log queries that take longer than 90 seconds.

TODO:
- address the TODOs that make the asserts configurable.
2017-01-27 13:16:27 -06:00
Cody Soyland
5206461d51 Migrate from Umbel to Pilosa organization on Github 2016-11-28 15:21:11 -06:00
Ben Johnson
f23bb05e8d Clear empty containers, add assertions. 2016-11-03 13:42:46 -06:00
tgruben
709fbc4308 Merge pull request #130 from benbjohnson/check
Add pilosactl check.
2016-10-26 20:34:10 -05:00
Ben Johnson
3192897f55 Add pilosactl check. 2016-10-26 13:51:23 -06:00
Ben Johnson
feceaf429e Avoid array write if length is zero. 2016-10-26 13:47:37 -06:00
Todd Gruben
ad852fdbf1 cleaned up constant 2016-09-23 16:04:22 -05:00
Todd Gruben
5f65636199 fix roaring.Difference crash 2016-09-23 13:27:35 -05:00
Todd Gruben
6a8973f7c9 fix for intersect and updated tests 2016-09-22 16:47:39 -05:00
Ben Johnson
46bef724a5 Add import sorting command.
Introduces new `pilosactl sort` to sort import files by bit
position so they can be inserted faster. Also optimizes container
scanning and adds a `-buffer-size` flag to `import`.
2016-09-21 14:33:24 -06:00
Ben Johnson
cf4297a771 Optimize TopN() w/ source query.
This commit makes several changes to optimize the TopN() query:

- Reduce highbits() back from 24-bits to 16-bits.
- Reduce MaxArraySize back from 2^20 to 4096.
- Optimize bitmap count invalidation.
- Parallelize TopN() across nodes.
- Parallelize TopN() across slices.
2016-09-13 14:55:56 -06:00
Ben Johnson
39ed7de5c4 Optimize IntersectionCount for Array+Bitmap
Reworks the `roaring.intersectionCountArrayBitmap()` call to avoid
using an iterator. Performance of the included benchmark went from
2.5ms to 1.1ms.

Some of the issue with intersectionCount is the increased size of
bitmaps and slices and I need to do additional testing with various
sizes.
2016-09-07 10:13:31 -06:00
Ben Johnson
04c814141a Optimize bitmap with zero copy
Segments bitmaps by slice and changes `Fragment.Bitmap()` to return
bitmaps with segments which are offset ranges of mmapped bitmaps.
2016-08-25 13:30:25 -06:00
Ben Johnson
650e03cc79 add CountRange()
This commit adds `roaring.Bitmap.CountRange()` to return the number
of bits in a subrange of a bitmap. This significantly improves
server start time and is needed for upcoming zero copy bitmap
optimizations.
2016-08-15 16:03:25 -06:00
Ben Johnson
a063421467 serialize cache flush
This commit moves the cache flush to the `Index` and only serializes
a single fragment at a time.

Also included in this commit is the `inspect` command for the
`pilsoactl` binary. This provides insight into pilosa data files.
2016-08-05 14:58:37 -06:00
Ben Johnson
36cd2c84c1 optimize union() & difference()
This commit moves the `Union()` and `Difference()` operations into
the `roaring` package to improve performance.
2016-06-28 14:29:37 -06:00
Ben Johnson
a8feb985e1 roaring: change bit split to 40/24
This commit changes the `roaring.Bitmap` to use a 40/24 split in
the high and low bits. This change also requires the low bits
to use `uint32` instead of `uint16`.
2016-06-20 20:37:05 -06:00