-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from otiai10/feature/concurrent-dcopy
Feature/concurrent dcopy
- Loading branch information
Showing
16 changed files
with
177 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package copy | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
) | ||
|
||
func BenchmarkOptions_NumOfWorkers_0(b *testing.B) { | ||
var num int64 = 0 // 0 or 1 = single-threaded | ||
opt := Options{NumOfWorkers: num} | ||
for i := 0; i < b.N; i++ { | ||
Copy("test/data/case19", fmt.Sprintf("test/data.copy/case19-%d-%d", num, i), opt) | ||
} | ||
} | ||
|
||
func BenchmarkOptions_NumOfWorkers_2(b *testing.B) { | ||
var num int64 = 2 | ||
opt := Options{NumOfWorkers: num} | ||
for i := 0; i < b.N; i++ { | ||
Copy("test/data/case19", fmt.Sprintf("test/data.copy/case19-%d-%d", num, i), opt) | ||
} | ||
} | ||
|
||
func BenchmarkOptions_NumOfWorkers_4(b *testing.B) { | ||
var num int64 = 4 | ||
opt := Options{NumOfWorkers: num} | ||
for i := 0; i < b.N; i++ { | ||
Copy("test/data/case19", fmt.Sprintf("test/data.copy/case19-%d-%d", num, i), opt) | ||
} | ||
} | ||
|
||
func BenchmarkOptions_NumOfWorkers_8(b *testing.B) { | ||
var num int64 = 8 | ||
opt := Options{NumOfWorkers: num} | ||
for i := 0; i < b.N; i++ { | ||
Copy("test/data/case19", fmt.Sprintf("test/data.copy/case19-%d-%d", num, i), opt) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= | ||
github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= | ||
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= | ||
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= | ||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= | ||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Concurrent case |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.