mirror of
https://github.com/rclone/rclone.git
synced 2025-08-12 06:59:29 +02:00
chunkedreader: add --vfs-read-chunk-streams to parallel read chunks
This converts the ChunkedReader into an interface and provides two implementations one sequential and one parallel. This can be used to improve the performance of the VFS on high bandwidth or high latency links. Fixes #4760
This commit is contained in:
20
fs/chunkedreader/sequential_test.go
Normal file
20
fs/chunkedreader/sequential_test.go
Normal file
@ -0,0 +1,20 @@
|
||||
package chunkedreader
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
_ "github.com/rclone/rclone/backend/local"
|
||||
"github.com/rclone/rclone/fstest/mockobject"
|
||||
)
|
||||
|
||||
func TestSequential(t *testing.T) {
|
||||
content := makeContent(t, 1024)
|
||||
|
||||
for _, mode := range mockobject.SeekModes {
|
||||
t.Run(mode.String(), testRead(content, mode, 0))
|
||||
}
|
||||
}
|
||||
|
||||
func TestSequentialErrorAfterClose(t *testing.T) {
|
||||
testErrorAfterClose(t, 0)
|
||||
}
|
Reference in New Issue
Block a user