コード例 #1
0
ファイル: Context.cs プロジェクト: bojanskr/nats.net
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder("JetStream Multi-Tool Run Config:");

            Append(sb, "action", "a", Action, true);
            Append(sb, "action", "lf", "Yes", LatencyFlag);
            Append(sb, "options factory", "of", _optionsFactory.GetType().FullName, true);
            Append(sb, "report frequency", "rf", ReportFrequency == Int32.MaxValue ? "no reporting" : "" + ReportFrequency, true);
            Append(sb, "subject", "u", Subject, true);
            Append(sb, "message count", "m", MessageCount, true);
            Append(sb, "threads", "d", Threads, true);
            Append(sb, "connection strategy", "n", ConnShared ? Arguments.Shared : Arguments.Individual, Threads > 1);

            Append(sb, "payload size", "p", PayloadSize + " bytes", Action.IsPubAction);
            Append(sb, "jitter", "j", Jitter, Action.IsPubAction);

            Append(sb, "round size", "r", RoundSize, Action.IsPubAction && Action.IsPubSync);

            Append(sb, "ack policy", "kp", AckPolicy, Action.IsSubAction);
            Append(sb, "ack all frequency", "kf", AckAllFrequency, Action.IsSubAction);
            Append(sb, "ack all frequency", "kf", AckAllFrequency, Action.IsPush && AckPolicy == AckPolicy.All);

            Append(sb, "batch size", "b", BatchSize, Action.IsPull);

            return(sb.ToString());
        }