Skip to content

Instantly share code, notes, and snippets.

Steves-MacBook-Pro:bleve steveyen$ go test -bench=. -tags 'leveldb forestdb'
# github.com/blevesearch/bleve
./examples_test.go:23: undefined: testing.M
FAIL github.com/blevesearch/bleve [build failed]
Steves-MacBook-Pro:bleve steveyen$ cd index
Steves-MacBook-Pro:index steveyen$ ls
index.go store upside_down
Steves-MacBook-Pro:index steveyen$ cd upside_down/
Steves-MacBook-Pro:upside_down steveyen$ go test -bench=. -tags 'leveldb forestdb'
PASS
Steves-MacBook-Pro:upside_down steveyen$ go test -bench=. -tags 'forestdb leveldb' -test.cpu=1,2,4
PASS
BenchmarkBoltDBIndexing1Workers 2000 1706871 ns/op
BenchmarkBoltDBIndexing1Workers-2 2000 1655773 ns/op
BenchmarkBoltDBIndexing1Workers-4 2000 1585455 ns/op
BenchmarkBoltDBIndexing2Workers 2000 1838335 ns/op
BenchmarkBoltDBIndexing2Workers-2 2000 1973725 ns/op
BenchmarkBoltDBIndexing2Workers-4 2000 1736743 ns/op
BenchmarkBoltDBIndexing4Workers 2000 1938127 ns/op
BenchmarkBoltDBIndexing4Workers-2 2000 1823462 ns/op
BenchmarkCznicBIndexing1Workers 10000 194685 ns/op
BenchmarkCznicBIndexing2Workers 10000 192764 ns/op
BenchmarkCznicBIndexing4Workers 10000 192492 ns/op
BenchmarkCznicBIndexing1Workers10Batch 10 178674461 ns/op
BenchmarkCznicBIndexing2Workers10Batch 10 177518181 ns/op
BenchmarkCznicBIndexing4Workers10Batch 10 173423240 ns/op
BenchmarkCznicBIndexing1Workers100Batch 10 151426467 ns/op
BenchmarkCznicBIndexing2Workers100Batch 10 153021023 ns/op
BenchmarkCznicBIndexing4Workers100Batch 10 153359453 ns/op
BenchmarkCznicBIndexing1Workers1000Batch 10 155143991 ns/op
BenchmarkLevelDBIndexing1Workers 2000 878951 ns/op
BenchmarkLevelDBIndexing2Workers 2000 870625 ns/op
BenchmarkLevelDBIndexing4Workers 2000 853268 ns/op
BenchmarkLevelDBIndexing1Workers10Batch 3 481541370 ns/op
BenchmarkLevelDBIndexing2Workers10Batch 3 484581233 ns/op
BenchmarkLevelDBIndexing4Workers10Batch 3 489633964 ns/op
BenchmarkLevelDBIndexing1Workers100Batch 5 237096086 ns/op
BenchmarkLevelDBIndexing2Workers100Batch 5 247093579 ns/op
BenchmarkLevelDBIndexing4Workers100Batch 5 237788204 ns/op
BenchmarkLevelDBIndexing1Workers1000Batch 10 172859968 ns/op
author := bleve.NewTextFieldMapping() // Alias lastModifierName as author.
author.Name = "author"
author.Analyzer = "en"
m.AddFieldMappingsAt("lastModifierName", author)
@steveyen
steveyen / gist:a69a8491ae5f52ba337f
Created March 16, 2015 17:26
Notes from talking with James Mauss about cbft and tech-support "supportability"...
James: let me look at your logs...
Especially the logs from cbft during some failure situations.
For example, what happens when couchbase (that cbft's pointed at) goes down or restarts?
Or the couchbase cluster goes through a rebalance?
What do I see in cbft's logs?
@steveyen
steveyen / gist:423bb059d07b16432c1b
Created March 18, 2015 00:33
get couchbaselabs/mini-hacks/xamarin/todo-sync/README.md
get couchbaselabs/mini-hacks/xamarin/todo-sync/README.md
VALUE couchbaselabs/mini-hacks/xamarin/todo-sync/README.md 1 11021
{"type":"github/text","repo":"couchbaselabs/mini-hacks","project":"mini-hacks","key":"couchbaselabs/mini-hacks/xamarin/todo-sync/README.md","url":"https://github.com/couchbaselabs/mini-hacks/blob/master/xamarin/todo-sync/README.md","ext":".md","title":"xamarin/todo-sync/README.md","contents":"TO-DO Task\n============\n\n### Goal\n\nBuild your first Couchbase Mobile app in just a few minutes! Take an existing Xamarin application and add data persistence!\n\n![Application Architecture](https://raw.githubusercontent.com/couchbaselabs/mini-hacks/master/kitchen-sync/topology.png \"Typical Couchbase Mobile Architecture\")\n\n### Setup\n\n - Clone this repo, or download the [.zip](https://github.com/couchbaselabs/mini-hacks/archive/master.zip).\n - Make sure you are on the latest Xamarin Studio.\n - Launch Xamarin Studio\n - Verify your environment is working by launching the sample Tasky app\n
@steveyen
steveyen / gist:5ec1a1807edc0ed02a1a
Created March 18, 2015 00:35
get couchbaselabs/lcbook/iops.md
get couchbaselabs/lcbook/iops.md
VALUE couchbaselabs/lcbook/iops.md 1 22501
{"type":"github/text","repo":"couchbaselabs/lcbook","project":"lcbook","key":"couchbaselabs/lcbook/iops.md","url":"https://github.com/couchbaselabs/lcbook/blob/master/iops.md","ext":".md","title":"iops.md","contents":"<!-- vim: set noexpandtab: --!>\n## I/O Integration\n\nlibcouchbase is an asynchronous I/O client and can integrate with numerous\nexisting event frameworks. The library gives several levels of control over\nits I/O integration. You can\n\n* Use a predefined backend with normal synchronous operation\n* Use a predefined backend with asynchronous operation\n* Implement an adaptor between your custom I/O system and libcouchbase\n\n### Using a compiled I/O backend\n\n> ###### Availability of Backends\n> Note that the availability of a backend will depend on whether the supporting\n> library is available and installed on the current platform. Not all backends\n> are available for all platforms.\n\nYou may use a predefined eve
@steveyen
steveyen / gist:31bcfa738abe7d6060c3
Created March 18, 2015 00:42
intrapop play mapping
{
"types": {
"beer": {
"enabled": true,
"dynamic": true,
"properties": {
"abv": {
"enabled": true,
"dynamic": true,
"fields": [
@steveyen
steveyen / bleve mapping
Created March 22, 2015 02:18
info for cbft issue 33, key too large
{
"types": {
"beer": {
"enabled": true,
"dynamic": true,
"properties": {
"abv": {
"enabled": true,
"dynamic": true,
"fields": [