pub fn run(
    timely_configuration: timely::Configuration,
    replay_source: ReplaySource) -> Result<(), STError> {

    timely::execute(timely_configuration, move |worker| {
        let index = worker.index();

        // read replayers from file (offline) or TCP stream (online)
        let readers = connect::make_readers(replay_source.clone(), worker.index(), worker.peers()).expect("couldn't create readers");

        worker.dataflow(|scope| {
            let pag: Stream<_, (PagEdge, Pair<u64, Duration>, isize)>  = pag::create_pag(scope, readers, index, 1);

            pag
                .khops()
                .khops_summary()
                .inspect_time(|t, x| println!("{}: {:?}", t.first, x));
        });
    })
        .map_err(|x| STError(format!("error in the timely computation: {}", x)))?;

    Ok(())
}
/// Runs graph algorithms on ST2.
Runs graph algorithms on ST2.
Runs graph algorithms on ST2 .
pub fn run(
    timely_configuration: timely::Configuration,
    replay_source: ReplaySource) -> Result<(), STError> {
    timely::execute(timely_configuration, move |worker| {
        let index = worker.index();
        // read replayers from file (offline) or TCP stream (online)
        let readers = connect::make_readers(replay_source.clone(), worker.index(), worker.peers()).expect("couldn't create readers");
        worker.dataflow(|scope| {
            let pag: Stream<_, (PagEdge, Pair<u64, Duration>, isize)>  = pag::create_pag(scope, readers, index, 1);
            pag
                .khops()
                .khops_summary()
                .inspect_time(|t, x| println!("{}: {:?}", t.first, x));
        });
    })
        .map_err(|x| STError(format!("error in the timely computation: {}", x)))?;
    Ok(())
}
pub fn run ( timely_configuration : timely :: Configuration , replay_source : ReplaySource ) -> Result < ( ) , STError > { timely :: execute ( timely_configuration , move | worker | { let index = worker . index ( ) ; // read replayers from file (offline) or TCP stream (online) let readers = connect :: make_readers ( replay_source . clone ( ) , worker . index ( ) , worker . peers ( ) ) . expect ( " " ) ; worker . dataflow ( | scope | { let pag : Stream < _ , ( PagEdge , Pair < u64 , Duration > , isize ) > = pag :: create_pag ( scope , readers , index , 1 ) ; pag . khops ( ) . khops_summary ( ) . inspect_time ( | t , x | println ! ( " " t first x ) ) ; } ) ; } ) . map_err ( | x | STError ( format ! ( " " x ) ) ) ? ; Ok ( ( ) ) }
Runs graph algorithms on ST2.
Runs graph algorithms on ST2 .
timely_configuration
timely::Configuration
replay_source
ReplaySource
timely_configuration
timely::Configuration
replay_source
ReplaySource