func main() { fmt.Printf("io test starting.\n") d := dscout.NewDscout("bar.xml.gz") t := records.NewTrace(6, 16) for i := 0; i < 4; i++ { t.Header[i] = i } for i := 0; i < 10; i++ { t.Data[i] = 10.5 - float64(i) } for i := 0; i < 5; i++ { t.Header[0] = i d.HandleTrace(t) } d.HandleEod() e := dscin.NewDscin("bar.xml.gz") for { t = e.HandleTrace() if t == nil { break } else { t.Summarize() t.Detail() } } fmt.Printf("io testy done\n") }
func main() { fmt.Printf("Hello gosp version 0.1\n") // will probably want to have some sort of factory to create the operations // then Execute() is a method on the operation. waiter := &sync.WaitGroup{} /* writing */ if false { d := datgen.NewDatgen(waiter, 5) f := filter.NewFilter(waiter) o := dscout.NewDscout(waiter, "foobar.xml") d.Append(&f.Operation) f.Append(&o.Operation) go d.Execute() go f.Execute() go o.Execute() } else { /* reading */ d := dscin.NewDscin(waiter, "foobar.xml") go d.Execute() } waiter.Wait() fmt.Printf("Goodbye gosp version 0.1\n") }