public override string ToString() { string newline = Environment.NewLine; StringBuilder sb = new StringBuilder(); sb.Append(sequence.ToString()); sb.Append(newline); return(sb.ToString()); }
public static void Main(string[] args) { var p = InitProps(); Config conf = new Config(p); PerfRunData runData = new PerfRunData(conf); // 1. top sequence TaskSequence top = new TaskSequence(runData, null, null, false); // top level, not parallel // 2. task to create the index CreateIndexTask create = new CreateIndexTask(runData); top.AddTask(create); // 3. task seq to add 500 docs (order matters - top to bottom - add seq to top, only then add to seq) TaskSequence seq1 = new TaskSequence(runData, "AddDocs", top, false); seq1.SetRepetitions(500); seq1.SetNoChildReport(); top.AddTask(seq1); // 4. task to add the doc AddDocTask addDoc = new AddDocTask(runData); //addDoc.setParams("1200"); // doc size limit if supported seq1.AddTask(addDoc); // order matters 9see comment above) // 5. task to close the index CloseIndexTask close = new CloseIndexTask(runData); top.AddTask(close); // task to report RepSumByNameTask rep = new RepSumByNameTask(runData); top.AddTask(rep); // print algorithm Console.WriteLine(top.ToString()); // execute top.DoLogic(); }