예제 #1
0
            public void Log(string s, T t)
            {
                string decorated = context.Shard.ToString() + "<" + t.ToString() + ">" + ":" + s;

                if (inlineStatistics == null)
                {
                    Console.WriteLine(decorated);
                }
                else
                {
                    inlineStatistics.Send(decorated, t);
                }
            }
예제 #2
0
            public void OnRecv(Message <Pair <Pair <string, ReportingRecord <R> >, T> > message)
            {
                for (int i = 0; i < message.length; i++)
                {
                    string name           = message.payload[i].v1.v1;
                    ReportingRecord <R> r = message.payload[i].v1.v2;
                    if (r.type == Naiad.Dataflow.Reporting.AggregateType.Average)
                    {
                        Context.Reporting.Log(name + ": " + r.payload + "," + r.count, message.payload[i].v2);
                    }
                    else
                    {
                        Context.Reporting.Log(name + ": " + r.payload, message.payload[i].v2);
                    }
                }

                output.Send(message);
            }