Skip to content

Instantly share code, notes, and snippets.

View lsm_example_large.go
testV := TestValue{
A: 1,
B: 1,
C: 3,
D: "packagemainimport(\\\"bufio\\\"\\\"fmt\\\"\\\"github.com/whuanle/lsm\\\"\\\"github.com/whuanle/lsm/config\\\"\\\"os\\\"\\\"time\\\")typeTestValuestruct{Aint64Bint64Cint64Dstring}funcmain(){deferfunc(){r:=recover()ifr!=nil{fmt.Println(r)inputReader:=bufio.NewReader(os.Stdin)_,_=inputReader.ReadString('\\\\n')}}()lsm.Start(config.Config{DataDir:`E:\\\\项目\\\\lsm数据测试目录`,Level0Size:100,PartSize:4,Threshold:20000,})//64个字节testV:=TestValue{A:1,B:1,C:3,D:\\\"packagemainimport(\\\\\\\\\\\\\\\"bufio\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"fmt\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"github.com/whuanle/lsm\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"github.com/whuanle/lsm/config\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"os\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"time\\\\\\\\\\\\\\\")typeTestValuestruct{Aint64Bint64Cint64Dstring}funcmain(){deferfunc(){r:=recover()ifr!=nil{fmt.Println(r)inputReader:=bufio.NewReader(os.Stdin)_,_=inputReader.ReadString('\\\\\\\\\\\\\\\\n')}}()lsm.Start(config.Config{DataDir:`E:\\\\\\\\\\\\\\\\项目\\\\\
View lsm_example.go
package main
import (
"bufio"
"fmt"
"github.com/whuanle/lsm"
"github.com/whuanle/lsm/config"
"os"
"time"
)