Examples of Calltime


Examples of org.rhq.enterprise.communications.command.server.CommandProcessorMetrics.Calltime

            PropertyList commands = new PropertyList("commands");
            result.getComplexResults().put(commands);

            for (Map.Entry<String, Calltime> data : allData.entrySet()) {
                String commandName = data.getKey();
                Calltime calltime = data.getValue(); // do not alter the values in here, its a shallow copy
               
                // If successes is 0, the Callback values will have Long.MIN/MAX_VALUE for maximum and minimum times.
                // But if successes is 0, we know we can't have valid values anyway, so just zero them out.
                long minimum = 0;
                long maximum = 0;
                long average = 0;
                if (calltime.getSuccesses() > 0) {
                    minimum = calltime.getMinimum();
                    maximum = calltime.getMaximum();
                    average = calltime.getAverage();                   
                }

                PropertyMap command = new PropertyMap("command", //
                    new PropertySimple("command", commandName), //
                    new PropertySimple("totalCount", calltime.getCount()), //
                    new PropertySimple("successCount", calltime.getSuccesses()), //
                    new PropertySimple("failureCount", calltime.getFailures()), //
                    new PropertySimple("droppedCount", calltime.getDropped()), //
                    new PropertySimple("notProcessedCount", calltime.getNotProcessed()), //
                    new PropertySimple("executionMinTime", minimum), //
                    new PropertySimple("executionMaxTime", maximum), //
                    new PropertySimple("executionAvgTime", average));
                commands.add(command);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.