Skip to content

Commit

Permalink
update dd3ba2038305c2215c32eaaa302e2f03185cab1a
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomjhj committed Oct 18, 2023
1 parent 55330cf commit f6b9ff7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion homework/scripts/grade-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ _run_tests_with() {
local FAILED=0
for TEST in "${TESTS[@]}"; do
local TEST_CMD="$CARGO test $* $TEST"
timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD 2>/dev/null" 1>&2
timeout ${TIMEOUT:-20s} bash -c "$TEST_CMD" 1>&2
case $? in
0) ;;
124) echo_err "Test timed out: $TEST_CMD"; FAILED=$((FAILED + 1));;
Expand Down
3 changes: 3 additions & 0 deletions homework/tests/list_set/main.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
// optimistic_fine_grained on thread santizer has very unstable performance on gg.
#![feature(cfg_sanitize)]

mod fine_grained;
mod optimistic_fine_grained;
6 changes: 3 additions & 3 deletions homework/tests/list_set/optimistic_fine_grained.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@ fn stress_sequential() {

#[test]
fn stress_concurrent() {
const THREADS: usize = 16;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * 16;
set::stress_concurrent::<u8, OptimisticFineGrainedListSet<u8>>(THREADS, STEPS);
}

#[test]
fn log_concurrent() {
const THREADS: usize = 16;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * 16;
set::log_concurrent::<u8, OptimisticFineGrainedListSet<u8>>(THREADS, STEPS);
}

/// Check the consistency of iterator while other operations are running concurrently.
#[test]
fn iter_consistent() {
const THREADS: usize = 15;
const THREADS: usize = if cfg!(sanitize = "thread") { 3 } else { 15 };
const STEPS: usize = 4096 * 16;

let set = OptimisticFineGrainedListSet::new();
Expand Down

0 comments on commit f6b9ff7

Please sign in to comment.