Skip to content

Commit

Permalink
"date" problem
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspiatkowski committed Jul 28, 2020
1 parent caa1f9f commit 2056450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion eden/mononoke/tests/integration/run_tests_getdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@
"test-traffic-replay.t", # Missing TRAFFIC_REPLAY
"test-unbundle-replay-hg-bookmark.t", # "kill" printing problem
"test-unbundle-replay-hg-recording.t", # Returns different data in OSS
"test-walker-throttle.t", # "date" and arithmetic problem
}

tests = [
Expand Down
8 changes: 4 additions & 4 deletions eden/mononoke/tests/integration/test-walker-throttle.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Base case, check can walk fine
Walked* (glob)

Check reads throttle
$ START_SECS=$(/usr/bin/date "+%s")
$ START_SECS=$(date "+%s")
$ mononoke_walker --storage-id=blobstore --readonly-storage --cachelib-only-blobstore --blobstore-read-qps=5 scrub -I deep -q --bookmark master_bookmark 2>&1 | strip_glog
Walking roots * (glob)
Walking edge types * (glob)
Walking node types * (glob)
Final count: (40, 40)
Bytes/s,* (glob)
Walked* (glob)
$ END_SECS=$(/usr/bin/date "+%s")
$ END_SECS=$(date "+%s")
$ ELAPSED_SECS=$(( "$END_SECS" - "$START_SECS" ))
$ if [[ "$ELAPSED_SECS" -ge 4 ]]; then echo Took Long Enough Read; else echo "Too short: $ELAPSED_SECS"; fi
Took Long Enough Read
Expand All @@ -49,7 +49,7 @@ Delete all data from one side of the multiplex
$ rm blobstore/0/blobs/*

Check writes throttle in Repair mode
$ START_SECS=$(/usr/bin/date "+%s")
$ START_SECS=$(date "+%s")
$ mononoke_walker --storage-id=blobstore --readonly-storage --cachelib-only-blobstore --blobstore-write-qps=5 scrub --scrub-blobstore-action=Repair -I deep -q --bookmark master_bookmark 2>&1 | strip_glog | sed -re 's/^(scrub: blobstore_id BlobstoreId.0. repaired for repo0000.).*/\1/' | uniq -c | sed 's/^ *//'
1 Walking roots * (glob)
1 Walking edge types * (glob)
Expand All @@ -58,7 +58,7 @@ Check writes throttle in Repair mode
1 Final count: (40, 40)
1 Bytes/s,* (glob)
1 Walked* (glob)
$ END_SECS=$(/usr/bin/date "+%s")
$ END_SECS=$(date "+%s")
$ ELAPSED_SECS=$(( "$END_SECS" - "$START_SECS" ))
$ if [[ "$ELAPSED_SECS" -ge 4 ]]; then echo Took Long Enough Repair; else echo "Too short: $ELAPSED_SECS"; fi
Took Long Enough Repair
Expand Down

0 comments on commit 2056450

Please sign in to comment.