Class IndustryStandard

java.lang.Object
com.cyara.apisamples.IndustryStandard

public class IndustryStandard
extends java.lang.Object
Grabs every Pulse call for a given timeframe on either every attached account or the specified account. Generates various metrics around connection times, response times, and more.

This is not an official Cyara product and is not officially supported. It is used for demonstration and training purposes. For assistance, contact chris.ryan@cyara.com

Version:
1.0
Author:
Chris Ryan
  • Constructor Summary

    Constructors 
    Constructor Description
    IndustryStandard()  
  • Method Summary

    Modifier and Type Method Description
    private static void collectData​(ApiFunctionalities connInfo, java.lang.String startString, java.lang.String endString, int accountNumber)
    Pulls every Pulse call within the specified parameters, and anonymously parses out every basic data points for every call.
    private static java.util.ArrayList<java.lang.Integer> getAttachedAccountIds​(ApiFunctionalities connInfo)
    Loop thru every account the user has access to, and store every single account ID.
    static void main​(java.lang.String[] argv)  
    private static void outputData​(java.util.ArrayList<java.lang.Integer> totalTCsPerAccount, java.util.ArrayList<java.lang.Integer> allConnTimes, java.util.ArrayList<java.lang.Integer> allInitTimes, java.util.ArrayList<java.lang.Integer> remainingResponseTimes, java.util.ArrayList<java.lang.Double> allConfScores, java.util.ArrayList<java.lang.Double> normalizedSuccessPcts)
    Initiate the calculations and print out the results for all the Pulse metrics collected.
    private static void processData​(ApiFunctionalities connInfo)
    Loop thru every Pulse call for every account collected for the given timeframe.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • main

      public static void main​(java.lang.String[] argv)
    • collectData

      private static void collectData​(ApiFunctionalities connInfo, java.lang.String startString, java.lang.String endString, int accountNumber)
      Pulls every Pulse call within the specified parameters, and anonymously parses out every basic data points for every call. Data points include response times, confidence scores, result, and more.
      Parameters:
      connInfo - The controller to the API credentials and methods
      startString - The date String of the earliest Pulse calls to grab
      endString - The date String of the latest Pulse calls to grab
      accountNumber - The value of which account to analyze. -1 to analyze all available
      Since:
      1.0
    • getAttachedAccountIds

      private static java.util.ArrayList<java.lang.Integer> getAttachedAccountIds​(ApiFunctionalities connInfo)
      Loop thru every account the user has access to, and store every single account ID.
      Parameters:
      connInfo - The controller to the API credentials and methods
      Returns:
      An ArrayList with all the account IDs the user is attached to
      Since:
      1.0
    • processData

      private static void processData​(ApiFunctionalities connInfo)
      Loop thru every Pulse call for every account collected for the given timeframe. Categorize and store the various basic metrics, then process and output them.
      Parameters:
      connInfo - The controller to the API credentials and methods
      Since:
      1.0
    • outputData

      private static void outputData​(java.util.ArrayList<java.lang.Integer> totalTCsPerAccount, java.util.ArrayList<java.lang.Integer> allConnTimes, java.util.ArrayList<java.lang.Integer> allInitTimes, java.util.ArrayList<java.lang.Integer> remainingResponseTimes, java.util.ArrayList<java.lang.Double> allConfScores, java.util.ArrayList<java.lang.Double> normalizedSuccessPcts)
      Initiate the calculations and print out the results for all the Pulse metrics collected.
      Parameters:
      totalTCsPerAccount - Every number of test cases by account
      allConnTimes - Every Step 0 response time collected
      allInitTimes - Every Step 1 response time collected
      remainingResponseTimes - Every Step 2 and beyond response time collected
      allConfScores - Every confidence score result collected
      normalizedSuccessPcts - Every account success percentage
      Since:
      1.0