You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

xacml-dpd statistics

Has this XacmlPdpStatisticsManager class with the counter/update actions

private static XacmlPdpStatisticsManager current object is never used, only setted.

public class XacmlPdpStatisticsManager {
    @Getter
    @Setter
    private static XacmlPdpStatisticsManager current = null;

    private long totalPolicyTypesCount;
    private long totalPoliciesCount;
    private long errorsCount;
    private long permitDecisionsCount;
    private long denyDecisionsCount;
    private long indeterminantDecisionsCount;
    private long notApplicableDecisionsCount;
}


drools-pdp

Uses the PolicyStats class to have the numbers but for policy execution

public class PolicyStats {

    private static final Logger logger = getLogger(PolicyStats.class);

    /**
     * Number of executed policy transactions.
     */
    private long policyExecutedCount;

    /**
     * Number of successfully executed policy transactions.
     */
    private long policyExecutedSuccessCount;

    /**
     * Number of failed executions of policy transactions.
     */
    private long policyExecutedFailCount;

    /**
     * Last time the policy transaction was executed.
     */
    private long lastExecutionTime;

    /**
     * Average execution time of a policy transaction.
     */
    private double averageExecutionTime;

    /**
     * Total policy execution times.
     */
    private double totalElapsedTime;

    /**
     * Uptime of the entity holding the stats.
     */
    private long birthTime = Instant.now().toEpochMilli();

    /**
     * Time last transaction was started.
     */
    private long lastStart;
}

pap

public class PapStatisticsManager {

    private final AtomicLong totalPdpCount = new AtomicLong(0);
    private final AtomicLong totalPdpGroupCount = new AtomicLong(0);
    private final AtomicLong totalPolicyDeployCount = new AtomicLong(0);
    private final AtomicLong policyDeploySuccessCount = new AtomicLong(0);
    private final AtomicLong policyDeployFailureCount = new AtomicLong(0);
    private final AtomicLong totalPolicyDownloadCount = new AtomicLong(0);
    private final AtomicLong policyDownloadSuccessCount = new AtomicLong(0);
    private final AtomicLong policyDownloadFailureCount = new AtomicLong(0);
}

apex-pdp

public class ApexPolicyStatisticsManager {
    private static final Logger LOGGER = LoggerFactory.getLogger(ApexPolicyStatisticsManager.class);
    public static final String REG_APEX_PDP_POLICY_COUNTER = "object:pdp/statistics/policy/counter";
    private final AtomicLong policyDeployCount = new AtomicLong(0);
    private final AtomicLong policyDeploySuccessCount = new AtomicLong(0);
    private final AtomicLong policyDeployFailCount = new AtomicLong(0);
    private final AtomicLong policyExecutedCount = new AtomicLong(0);
    private final AtomicLong policyExecutedSuccessCount = new AtomicLong(0);
    private final AtomicLong policyExecutedFailCount = new AtomicLong(0);
}

Questions:

all the mentioned classes track different operations?

can we have one class with common counters then add the extra?

are they all converging to Pdp Statistics entity?

more to come

  • No labels