[ARVADOS] updated: 928c4a5b8d3645994d99c881914bcf1683e69d1d

Git user git at public.curoverse.com
Mon Nov 7 17:00:12 EST 2016


Summary of changes:
 build/run-tests.sh                   |  4 +++-
 tools/keep-exercise/keep-exercise.go | 17 +++++++++++------
 2 files changed, 14 insertions(+), 7 deletions(-)

       via  928c4a5b8d3645994d99c881914bcf1683e69d1d (commit)
       via  b8641edca2fa6bb3325b057264a81b6ce71b9f19 (commit)
      from  66b8e9d2f1178ddec2924eadae721e2dfd9a4a67 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 928c4a5b8d3645994d99c881914bcf1683e69d1d
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 7 17:00:03 2016 -0500

    Run keep-exercise tests. No issue #

diff --git a/build/run-tests.sh b/build/run-tests.sh
index 2797ec3..fa60873 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -93,6 +93,7 @@ sdk/go/streamer
 sdk/go/crunchrunner
 sdk/cwl
 tools/crunchstat-summary
+tools/keep-exercise
 tools/keep-rsync
 tools/keep-block-check
 
@@ -764,8 +765,9 @@ gostuff=(
     services/crunch-dispatch-local
     services/crunch-dispatch-slurm
     services/crunch-run
-    tools/keep-rsync
     tools/keep-block-check
+    tools/keep-exercise
+    tools/keep-rsync
     )
 for g in "${gostuff[@]}"
 do

commit b8641edca2fa6bb3325b057264a81b6ce71b9f19
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 7 16:54:11 2016 -0500

    keep-exercise: limit PRNG usage to 512KiB per write. No issue #

diff --git a/tools/keep-exercise/keep-exercise.go b/tools/keep-exercise/keep-exercise.go
index 4131d75..6d791bf 100644
--- a/tools/keep-exercise/keep-exercise.go
+++ b/tools/keep-exercise/keep-exercise.go
@@ -56,11 +56,11 @@ func main() {
 
 	overrideServices(kc)
 
-	nextBuf := make(chan []byte, *WriteThreads)
 	nextLocator := make(chan string, *ReadThreads+*WriteThreads)
 
 	go countBeans(nextLocator)
 	for i := 0; i < *WriteThreads; i++ {
+		nextBuf := make(chan []byte, 1)
 		go makeBufs(nextBuf, i)
 		go doWrites(kc, nextBuf, nextLocator)
 	}
@@ -106,23 +106,28 @@ func countBeans(nextLocator chan string) {
 	}
 }
 
-func makeBufs(nextBuf chan []byte, threadID int) {
+func makeBufs(nextBuf chan<- []byte, threadID int) {
 	buf := make([]byte, *BlockSize)
 	if *VaryThread {
 		binary.PutVarint(buf, int64(threadID))
 	}
+	randSize := 524288
+	if randSize > *BlockSize {
+		randSize = *BlockSize
+	}
 	for {
 		if *VaryRequest {
-			buf = make([]byte, *BlockSize)
-			if _, err := io.ReadFull(rand.Reader, buf); err != nil {
+			rnd := make([]byte, randSize)
+			if _, err := io.ReadFull(rand.Reader, rnd); err != nil {
 				log.Fatal(err)
 			}
+			buf = append(rnd, buf[randSize:]...)
 		}
 		nextBuf <- buf
 	}
 }
 
-func doWrites(kc *keepclient.KeepClient, nextBuf chan []byte, nextLocator chan string) {
+func doWrites(kc *keepclient.KeepClient, nextBuf <-chan []byte, nextLocator chan<- string) {
 	for buf := range nextBuf {
 		locator, _, err := kc.PutB(buf)
 		if err != nil {
@@ -139,7 +144,7 @@ func doWrites(kc *keepclient.KeepClient, nextBuf chan []byte, nextLocator chan s
 	}
 }
 
-func doReads(kc *keepclient.KeepClient, nextLocator chan string) {
+func doReads(kc *keepclient.KeepClient, nextLocator <-chan string) {
 	for locator := range nextLocator {
 		rdr, size, url, err := kc.Get(locator)
 		if err != nil {

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list