Commit graph

5199 commits

Author SHA1 Message Date
Seebs
1a8633f3a5 use roaring conventions for variable names
Roaring likes to call things "a" and "b", not "1" and "2",
and use "n" for length, not "l", etcetera. Adopt these
conventions to make code more readable.

Also drop the 'vb' value since it isn't expensive to
compute and the compiler can figure out that it can
reuse the value.
2018-11-16 15:00:09 -06:00
Seebs
9b552ab508 enhance TestRunCountRange
confirm that the number of runs comes out as expected,
and add a couple of numbers out of order to verify that
the 17-18-19 set gets coalesced into one run even
if we add 17 and 19 before 18.
2018-11-16 14:59:46 -06:00
Seebs
d4364bea52 slightly streamline array/array comparison
The net effect of this is to not recompute "the current
value of the first array" on every loop, pretty much.
However, the swap to make sure the inner loop is on the
longer array seems to be significant for performance.
On my system, this moves runtime from ~29us per op
to ~17us per op.
2018-11-16 14:59:46 -06:00
Seebs
32c4b3540f simplify intersectBitmapRun output to remove a conversion
If the total number of things returned was small enough to
make an array, intersectBitmapRun converted to an array. This
seems possibly-premature; future processing might well prefer
a bitmap. We know everything gets optimized before being
written out, let's not convert without a specific reason. But
also, let's use an array no matter which container is small
enough to prove that we can do so safely.

Fixes #854.
2018-11-16 14:59:09 -06:00
Seebs
c8e6fd2e43 improve type matrix for IntersectionCount benchmarks
The circumstances under which bitmaps are converted between
types are not 100% nailed down, and the IntersectionCount
benchmark was actually using a bitmap for the "run" data set
as well as for the "bitmap" data set. Fix that by using
Optimize() explicitly. Also, add a second RLE set so we
can compare the difference between "one run for the entire
set" and "several runs".

Also add array/array comparisons. We use two different
lengths of arrays, because performance turns out to vary
between "first array longer" and "second array longer".

Also added a benchmark for getBenchData itself, since it's
at least one possible use case for "creating a lot of
containers".
2018-11-16 14:59:09 -06:00
Travis Turner
08d7f65667
increase the translate file size for tests/benchmarks 2018-11-16 13:01:21 -06:00
seebs
377abb22c2
Merge pull request #1743 from seebs/seebs/stats
add some stat tracking to roaring/ implementation.
2018-11-16 10:02:00 -06:00
Seebs
8e270f9201 provide commented-out test case for bug in dead code
bitmapEquals isn't currently being called ever, but it has
an arcane edge-case bug, so I've made the test case for it
and commented it out for future reference.
2018-11-15 15:11:08 -06:00
Seebs
33add4f1e0 proof of concept for stats
This commit adds some trivial stat-tracking which can be
observed at localhost:10101/debug/vars. However, writes to
a locking data structure aren't cheap, so the stat-tracking
is by default not compiled. To build it, add the build
tag `roaringstats`, which will cause the `statsHit` function
to actually do something. Otherwise, it's an empty and
inlineable function, meaning the compiler throws it away
entirely.

This would, in principle, let us get additional visibility
into edge cases and which code paths are hot. This is not
the same thing as profiling for overall performance; the
stat counts aren't affected by whether a particular code path
is using a large amount of CPU time, just reporting how
often it happens at all.
2018-11-15 15:10:48 -06:00
Seebs
a203313143 move Logger and Stats to their own packages
I'd like to add stat tracking to Roaring, which means it
has to be able to import the stats package, which means
stats has to be a package rather than part of the pilosa
package. If stats stops being in pilosa, it still needs
a way to import logger, so logger also has to leave the
pilosa package. Then everything using them needs to import
them and use package selectors on their names.

This doesn't actually add the stats support to roaring,
it just makes it so there's a way to import the stats
code from something in the roaring package.
2018-11-15 15:10:44 -06:00
Yuce Tekol
84148d4ee6
Merge pull request #1742 from yuce/fix-unmarshal-bitmap-with-empty-data
Prevent panic in Bitmap.UnmarshalBinary when there is no data
2018-11-15 22:21:38 +03:00
Yuce Tekol
70f85211d9
prevent panic in Bitmap.UnmarshalBinary when there is no data 2018-11-15 22:06:21 +03:00
Yuce Tekol
0fe5d56f68
Merged with master 2018-11-15 21:19:58 +03:00
Yuce Tekol
2bab6eb5ec
enable roaring import for time fields; build view name 2018-11-14 16:31:09 +03:00
Cody Soyland
faac64dc99
Merge pull request #1740 from codysoyland/circleci-shield
Remove TravisCI, add CircleCI shield
2018-11-13 13:28:45 -06:00
Cody Soyland
1cd7ebdd2c Remove TravisCI, add CircleCI shield 2018-11-13 12:34:44 -06:00
Matthew Jaffee
49b75aef69
Merge pull request #1717 from jaffee/cluster-tests
Cluster tests
2018-11-13 12:10:54 -06:00
Matt Jaffee
a9d108200b
update circle ci config with cody's feedback 2018-11-13 11:52:08 -06:00
Matt Jaffee
08431f6e76
iterate on ci config 2018-11-13 09:53:44 -06:00
Matt Jaffee
26cd503393
try to run clustertests in CI 2018-11-13 09:51:22 -06:00
Matt Jaffee
bc8b991220
rename Dockerfile-withgo to Dockerfile-clustertests 2018-11-13 09:31:16 -06:00
Matt Jaffee
0d4a46af97
use internal client instead of go-pilosa, use ADD instead of wget 2018-11-13 09:24:35 -06:00
Matt Jaffee
37ac8b7a93
better use of docker-compose opts per code review 2018-11-12 17:44:23 -06:00
Matt Jaffee
90c5f64b19
filter memberlist debug and info logs, use t.Log instead of fmt in cluster tests 2018-11-12 14:01:57 -06:00
Yuce Tekol
1642e22872
fixed handler tests 2018-11-12 19:24:32 +03:00
Yuce Tekol
84c04900e1
Import roaring enpoint accepts a list of views 2018-11-12 18:43:59 +03:00
Matt Jaffee
9c9b1c5afe
Merge branch 'master' into cluster-tests 2018-11-09 12:23:21 -06:00
Matt Jaffee
8cd53bf2c2
Revert "msg type stringer"
This reverts commit dd4685d43b.
2018-11-09 11:34:32 -06:00
Matt Jaffee
dd4685d43b
msg type stringer 2018-11-09 11:28:53 -06:00
Matt Jaffee
deae8ce7c0
improvements to clustertests and fix cluster pause bug by state sharing 2018-11-09 11:28:19 -06:00
Yuce Tekol
8c99bd7a15
Merge pull request #1737 from yuce/remove-unused-rule-from-peg
Removed unused rule from peg grammar
2018-11-09 16:34:02 +03:00
Yuce Tekol
44e436f571
removed unused rule from peg grammar 2018-11-09 08:08:43 +03:00
Yuce Tekol
45e2951e87
fix GML warning 2018-11-08 20:48:56 +03:00
Yuce Tekol
745ec43432
fixes f.SetBit 2018-11-08 20:40:57 +03:00
Yuce Tekol
7913a419ae
adds NoStandardView field option. Fixes #1710 2018-11-08 18:33:39 +03:00
Yuce Tekol
27c222f02d
Refactored missing executeRequest bits; check resp is not nil 2018-11-08 17:02:07 +03:00
Yuce Tekol
fc231ff802
Fixes #1731 2018-11-08 17:01:05 +03:00
Yuce Tekol
8e58fe3541
Merge pull request #1729 from yuce/1697-internal-client-error-report
Improve Internal Client errors. Fixes #1697
2018-11-08 16:23:35 +03:00
Yuce Tekol
f2394f6d93
lowercase error msg 2018-11-08 08:25:43 +03:00
Yuce Tekol
7b7e96bdee
Trivial 2018-11-07 18:47:15 +03:00
Yuce Tekol
8d5f76d4f4
Fixes #1697 2018-11-07 18:37:28 +03:00
Yuce Tekol
2416d7a4c0
Merge pull request #1727 from yuce/allow-backslash-cr-in-pql-strings
fix double escapes
2018-11-07 01:25:59 +03:00
Yuce Tekol
cad9d83c40
fix double escapes 2018-11-07 01:10:58 +03:00
Yuce Tekol
997f448ef5
Merge pull request #1713 from yuce/allow-backslash-cr-in-pql-strings
Allow backslash, carriage return in PQL strings
2018-11-06 23:58:49 +03:00
Yuce Tekol
0c0709eb20
Merge branch 'master' into allow-backslash-cr-in-pql-strings 2018-11-06 23:28:57 +03:00
Travis Turner
0dbd8738df
Merge pull request #1725 from travisturner/upgrade-peg
upgrade peg at: github.com/pointlander/peg
2018-11-06 14:16:19 -06:00
Yuce Tekol
6cdfafc257
Merge branch 'master' into allow-backslash-cr-in-pql-strings 2018-11-06 23:16:13 +03:00
Travis Turner
5b30393bc9
upgrade peg at: github.com/pointlander/peg 2018-11-06 14:12:06 -06:00
Travis Turner
89f0c82e01
Merge pull request #1724 from travisturner/upgrade-protoc
upgrade to protoc 3.6.1. (also updated protoc-gen-gofast).
2018-11-06 14:11:28 -06:00
Travis Turner
be202a61a7
upgrade to protoc 3.6.1. (also updated protoc-gen-gofast). 2018-11-06 14:01:09 -06:00