コード例 #1
0
ファイル: StatusTreeMap.cs プロジェクト: TzarIvan/ratel
        void updateNode(LiveSystem liveSystem, QNode node)
        {
            var childNodes = list <LiveMarketNode>(node.children());
            var totalTicks = sum(convert(childNodes, child => child.ticksReceived));

            if (totalTicks == 0)
            {
                return;
            }
            var tickRate = sum(convert(childNodes, child => child.tickRate));
            var tickLag  = max(convert(childNodes, child => child.tickLag));

            node.color = tickLag - 5000;
            node.size  = isEqualSizes_ ? 1 : Math.Max(1F, tickRate);
            var isDown            = exists(childNodes, child => child.isDown);
            var downText          = isDown ? "" : "DOWN ";
            var lastTickProcessed = max(convert(childNodes, child => child.lastTickProcessed));

            node.text =
                downText +
                liveSystem.pv().name() + " - " + liveSystem.id() + "\n" +
                tickRate.ToString("n0") + "/min, " + tickLag + "ms\n" +
                totalTicks.ToString("n0") + "\n" +
                lastTickProcessed.ToString("HH:mm:ss") + "\n";
        }
コード例 #2
0
ファイル: StatusTreeMap.cs プロジェクト: TzarIvan/ratel
 static void updateNode(QNode node)
 {
     node.size  = sum(convert(node.children(), child => child.size));
     node.color = max(convert(node.children(), child => child.color));
 }