Skip to content

Instantly share code, notes, and snippets.

author := bleve.NewTextFieldMapping() // Alias lastModifierName as author.
author.Name = "author"
author.Analyzer = "en"
m.AddFieldMappingsAt("lastModifierName", author)
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
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
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
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
@steveyen
steveyen / gist:12da0ae4c2874e2a04ea
Created May 21, 2014 17:47
clojurescript stack overflow
Steves-MacBook-Pro:cbfg steveyen$ lein version
Leiningen 2.3.4 on Java 1.7.0_55 Java HotSpot(TM) 64-Bit Server VM
Steves-MacBook-Pro:cbfg steveyen$ git remote -v
origin [email protected]:steveyen/cbfg.git (fetch)
origin [email protected]:steveyen/cbfg.git (push)
Steves-MacBook-Pro:cbfg steveyen$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
#!/usr/bin/env python
# fake, pseudocode for an incremental backup client that uses libupr
# and a mythical memcached-binary network library (mcb).
import sys
import sqlite
import uuid
import libupr
-- test usage: lua -l query -e "TEST_nlj(); TEST_scan()"
--
local tinsert = table.insert
local RESULT = 0x0001
local function scan(docs, scan_hints, join_prev, bb, doc_visitor_fun)
for i = 1, #docs do
doc_visitor_fun({ docs[i], join_prev })
end
#!/usr/bin/env python
import re
import os
import sys
import time
import socket
import threading
# Simple proxy, useful for recording HTTP REST protocol conversations.
<html>
<head>
<title>Awesome Game Site</title>
</head>
<body>
<h1>minecraft!</h1>
We love our
<a href="http://www.minecraft.net">
Minecraft!
</a>