Skip to content

Commit

Permalink
Merge pull request #13 from stanford-ppl/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
pyprogrammer authored Mar 20, 2024
2 parents 186aea9 + 9c973b7 commit 1dcd84f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fastrand = "2.0.1"
futures = "0.3.30"

[features]
default = ["dot", "log-mongo", "coroutines"]
default = ["coroutines"]
dot = ["dep:graphviz-rust"]
log-mongo = ["dep:mongodb", "logging"]
test-log-mongo = ["log-mongo"]
Expand Down
4 changes: 3 additions & 1 deletion src/channel/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ mod tests {
#[test]
fn test_receiver() {
let mut ctx = ProgramBuilder::default();
#[cfg(feature = "coroutines")]
crate::shim::config().set_stack_size(1 << 16);
let (snd, rcv) = ctx.unbounded();
ctx.add_child(TraceContext::new(
// (Value, Time) pairs
|| random_trace::<u32>(4096, 0, 16),
|| random_trace::<u32>(2, 0, 16),
snd,
));

Expand Down
8 changes: 5 additions & 3 deletions src/templates/pmu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,17 @@ impl<T: DAMType, IT: IndexLike, AT: DAMType> Context for PMU<T, IT, AT> {
}
self.reader.run();
self.reader.cleanup();
}).unwrap();
})
.unwrap();
crate::shim::spawn!(s, || {
if let Some(mut logger) = write_log {
logger.id = self.writer.id();
initialize_log(logger);
}
self.writer.run();
self.writer.cleanup();
}).unwrap();
})
.unwrap();
});
}

Expand Down Expand Up @@ -338,7 +340,7 @@ mod tests {

#[test]
fn simple_pmu_test() {
const TEST_SIZE: usize = 1024 * 64;
const TEST_SIZE: usize = 64;
let mut parent = ProgramBuilder::default();
const CHAN_SIZE: usize = TEST_SIZE;

Expand Down
2 changes: 2 additions & 0 deletions tests/channel_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ mod tests {
}

fn run_channel_test(test_size: i32, flavor_inference: bool, capacity: Option<usize>) {
#[cfg(feature = "coroutines")]
dam::shim::config().set_stack_size(1 << 16);
let mut ctx = ProgramBuilder::default();

let (snd, rcv) = match capacity {
Expand Down

0 comments on commit 1dcd84f

Please sign in to comment.