Skip to content

Commit

Permalink
"date" and arithmetic problem
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspiatkowski committed Jul 24, 2020
1 parent acfd05e commit c0590f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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 @@ -139,7 +139,6 @@
"test-server.t", # Returns different data in OSS
"test-traffic-replay.t", # Missing TRAFFIC_REPLAY
"test-unbundle-replay-hg-recording.t", # Returns different data in OSS
"test-walker-throttle.t", # "date" and arithmetic problem
}

tests = [
Expand Down
12 changes: 6 additions & 6 deletions eden/mononoke/tests/integration/test-walker-throttle.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ 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")
$ ELAPSED_SECS=$(( "$END_SECS" - "$START_SECS" ))
$ 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 -Ee '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,8 +58,8 @@ Check writes throttle in Repair mode
1 Final count: (40, 40)
1 Bytes/s,* (glob)
1 Walked* (glob)
$ END_SECS=$(/usr/bin/date "+%s")
$ ELAPSED_SECS=$(( "$END_SECS" - "$START_SECS" ))
$ 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 c0590f0

Please sign in to comment.