Add following dependencies to your Cargo.toml
:
[dependencies]
logformat = { git = "..." }
timely_adapter = { git = "..." }
module pagingtests | |
using Blobs | |
import Blobs | |
free_mem() = Sys.free_memory() / 2^20 | |
const MB = 2^20 | |
const MEMTARGET = 2048MB | |
const STATIC_SLOTS = convert(Int, MEMTARGET/MB/8) |
use std::time::Duration; | |
use std::sync::{Mutex, Arc}; | |
use std::path::PathBuf; | |
use tdiag_connect::receive as connect; | |
use tdiag_connect::receive::ReplaySource; | |
use timely::dataflow::operators::capture::replay::Replay; | |
use timely::dataflow::operators::inspect::Inspect; | |
use timely::logging::TimelyEvent; |
#!/bin/bash | |
# 2017-06 (paulirish): updated for latest sources | |
# and incorporated fixes from my comments here: https://gist.github.com/xiaom/8264691#gistcomment-1648455 | |
# 2015-ish (zmil): this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu | |
set -x |
use std::collections::HashMap; | |
use timely::dataflow::channels::pact::Pipeline; | |
use timely::dataflow::operators::generic::Operator; | |
use timely::dataflow::operators::unordered_input::UnorderedInput; | |
use timely::dataflow::operators::Inspect; | |
fn main() { | |
timely::execute_from_args(std::env::args(), |worker| { | |
let (mut input, cap) = worker.dataflow::<usize, _, _>(|scope| { | |
let mut queues = HashMap::new(); |
(ns diff-formatter) | |
(defn- extract-contents [[_ var-map time diff]] | |
(let [vars (map (comp read-string second) (re-seq #"\{\".*?\":(.*?)\}" var-map))] | |
[vars (read-string time) (read-string diff)])) | |
(defn format-diffs [data] | |
(let [[_ name content] (re-find #"\[\"(.*?)\",(.*)\]" data) | |
content-details (re-seq #"\[\[(?:(.*?)\],(\d+),(-?\d))*?\]" content)] | |
[name (map extract-contents content-details)])) |
use std::collections::BTreeMap; | |
use std::hash::Hash; | |
#[derive(Debug)] | |
enum NestedVal<T: Eq + Hash> { | |
Map(BTreeMap<T, NestedVal<T>>), | |
Arr(Vec<NestedVal<T>>), | |
Val(T), | |
} |
use differential_dataflow::input::InputSession; | |
use differential_dataflow::operators::consolidate::Consolidate; | |
use differential_dataflow::operators::Group; | |
fn main() { | |
timely::execute_from_args(std::env::args(), move |worker| { | |
let mut input = InputSession::new(); | |
worker.dataflow(|scope| { | |
input |
(ns merge.core) | |
(def unplanned-data | |
[[:loans :3 :amount 100] | |
[:loans :3 :from :1] | |
[:loans :3 :from :1 :name "a"] | |
[:loans :3 :observer :1] | |
[:loans :3 :observer :1 :name "a"] | |
[:loans :3 :observer :2] | |
[:loans :3 :observer :2 :name "b"] |
#![deny(missing_docs)] | |
//! A simple, mutable, single-linked list implementation, | |
//! following the tutorial [Learning Rust with entirely too many linked lists](http://cglab.ca/~abeinges/blah/too-many-lists/book/README.html), | |
//! updated for "modern" iterator implementation using traits | |
/// A mutable, singly linked list | |
#[derive(Default)] | |
pub struct List<T> { | |
head: Link<T> |