-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit tsfile-go #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Commit tsfile-go #124
Conversation
|
Hi, daihuia, this is indeed a very good job, but I have a question whether the implementation of this Go version has a performance improvement compared to the Java implementation of the same version? |
NiklasMerz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I look quickly at the code and found a few bigger commented out code blocks, that could be removed for better readabilty. Please correct me if I am wrong.
Another question: Why is this not a Go Module and built with an old Go version on Travis? Newer Go versions (mine is 1.16) expect a go.mod file and module support. Even with putting the go files in my GOPATH it won't build
Engine_WriteTsPerfTest.go:30:2: cannot find package "tsfile/common/constant" in any of:
/usr/local/go/src/tsfile/common/constant (from $GOROOT)
/home/niklas/go/src/tsfile/common/constant (from $GOPATH)
Engine_GenFilePerfTest.go:29:2: cannot find package "tsfile/common/log" in any of:
/usr/local/go/src/tsfile/common/log (from $GOROOT)
/home/niklas/go/src/tsfile/common/log (from $GOPATH)
TsFileSequenceReader.go:28:2: cannot find package "tsfile/encoding/decoder" in any of:
/usr/local/go/src/tsfile/encoding/decoder (from $GOROOT)
/home/niklas/go/src/tsfile/encoding/decoder (from $GOPATH)
Engine_PerfTest.go:26:2: cannot find package "tsfile/timeseries/filter" in any of:
/usr/local/go/src/tsfile/timeseries/filter (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/filter (from $GOPATH)
Engine_PerfTest.go:27:2: cannot find package "tsfile/timeseries/filter/operator" in any of:
/usr/local/go/src/tsfile/timeseries/filter/operator (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/filter/operator (from $GOPATH)
Engine_PerfTest.go:28:2: cannot find package "tsfile/timeseries/query" in any of:
/usr/local/go/src/tsfile/timeseries/query (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/query (from $GOPATH)
Engine_PerfTest.go:29:2: cannot find package "tsfile/timeseries/query/engine" in any of:
/usr/local/go/src/tsfile/timeseries/query/engine (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/query/engine (from $GOPATH)
Engine_PerfTest.go:30:2: cannot find package "tsfile/timeseries/read" in any of:
/usr/local/go/src/tsfile/timeseries/read (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/read (from $GOPATH)
TsFileSequenceReader.go:31:2: cannot find package "tsfile/timeseries/read/reader/impl/basic" in any of:
/usr/local/go/src/tsfile/timeseries/read/reader/impl/basic (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/read/reader/impl/basic (from $GOPATH)
Engine_WriteTsPerfTest.go:32:2: cannot find package "tsfile/timeseries/write/sensorDescriptor" in any of:
/usr/local/go/src/tsfile/timeseries/write/sensorDescriptor (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/write/sensorDescriptor (from $GOPATH)
Engine_WriteTsPerfTest.go:33:2: cannot find package "tsfile/timeseries/write/tsFileWriter" in any of:
/usr/local/go/src/tsfile/timeseries/write/tsFileWriter (from $GOROOT)
/home/niklas/go/src/tsfile/timeseries/write/tsFileWriter (from $GOPATH)
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file has no test in the name.
| } | ||
| } | ||
|
|
||
| var is_comment bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this variable be in loadItem?
| offset := pos + width - 1 | ||
| for i := 0; i < width; i++ { | ||
| index := offset - i | ||
| //value = setIntN(value, i, getByteN(data[index/8], index)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| } | ||
|
|
||
| func WriteLongLittleEndianPaddedOnBitWidth(value int64, out *bytes.Buffer, bitWidth int) { | ||
| //paddedByteNum := (bitWidth + 7) / 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| return buffer.Bytes() | ||
| } | ||
|
|
||
| //func Int64ToByteLittleEndian(num int64) []byte { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| if valueCount == 0 { | ||
| aa := []byte{24} | ||
| v.timeBuf.Write(aa) | ||
| //s.timeBuf.Write(utils.BoolToByte(true)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| return t.DataPointSli | ||
| } | ||
|
|
||
| //func PushBack(t *TsRecord, tuple dataPoint.DataPoint) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| value int32 | ||
| } | ||
|
|
||
| //func (d *DataPoint) Write(v []byte) ([]byte,error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| if pageHeaderErr != nil { | ||
| log.Error("init pageHeader error: ", pageHeaderErr) | ||
| } | ||
| // write pageheader to pageBuf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
| //start_edit wangcan 2018-10-15 | ||
| //if contain, _ := utils.MapContains(r.dataSeriesWriters, sd.GetSensorId()); !contain { | ||
| _, contain := r.dataSeriesWriters[sd.GetSensorId()] | ||
| if !contain { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
old code?
Merge 0.12.3 1213
No description provided.