cod fromatting

This commit is contained in:
Radu Ioan Fericean
2012-03-01 21:17:42 +02:00
parent d53ca34744
commit 9e3b9ef191
5 changed files with 17 additions and 5 deletions

View File

@@ -23,6 +23,18 @@ import (
//"log"
)
/*
json
BenchmarkRedisGetCost 5000 462787 ns/op
BenchmarkKyotoGetCost 10000 203543 ns/op
BenchmarkMongoGetCost 10000 320457 ns/op
gob
BenchmarkRedisGetCost 10000 258751 ns/op
BenchmarkKyotoGetCost 50000 38449 ns/op
BenchmarkMongoGetCost 10000 323262 ns/op
*/
func TestKyotoSplitSpans(t *testing.T) {
getter, _ := NewKyotoStorage("test.kch")
defer getter.Close()

View File

@@ -41,11 +41,11 @@ func NewKyotoStorage(filaName string) (*KyotoStorage, error) {
ks.dec = gob.NewDecoder(&ks.buf)
ks.enc = gob.NewEncoder(&ks.buf)
ks.trainGobEncoderAndDecoder()
ks.traingobEncoderAndDecoder()
return ks, err
}
func (ks *KyotoStorage) trainGobEncoderAndDecoder() {
func (ks *KyotoStorage) traingobEncoderAndDecoder() {
aps := []*ActivationPeriod{&ActivationPeriod{}}
ks.enc.Encode(aps)
ks.dec.Decode(&aps)

View File

@@ -39,11 +39,11 @@ func NewRedisStorage(address string, db int) (*RedisStorage, error) {
rs := &RedisStorage{db: ndb, dbNb: db}
rs.dec = gob.NewDecoder(&rs.buf)
rs.enc = gob.NewEncoder(&rs.buf)
rs.trainGobEncoderAndDecoder()
rs.traingobEncoderAndDecoder()
return rs, nil
}
func (rs *RedisStorage) trainGobEncoderAndDecoder() {
func (rs *RedisStorage) traingobEncoderAndDecoder() {
aps := []*ActivationPeriod{&ActivationPeriod{}}
rs.enc.Encode(aps)
rs.dec.Decode(&aps)

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
package timespans
import (
// "log"
// "log"
)
/*

Binary file not shown.