Android APIStatistics - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android APIStatistics class.

This code example shows how to use the following methods:methodCalled
This code example shows how to use the following methods:getInvocationStatistics, methodCalled, reset
 
    /** 
     * Tests statistics calculation/aggregation for an entire API 
     */ 
    public void testAPIStatistics() throws Exception { 
        APIStatistics stats = new APIStatistics(5); 
 
        checkCalculator(stats, 0, 0, 0, 0); 
        assertFalse(stats.getInvocationStatistics().iterator().hasNext()); 
 
        stats.methodCalled("foo", 100, true); 
        checkCalculator(stats, 1, 0, 100, 100); 
        checkMethodStats(stats, "foo", 1, 0, 100, 100); 
 
        stats.methodCalled("bar", 100, true); 
        checkCalculator(stats, 2, 0, 200, 100); 
        checkMethodStats(stats, "foo", 1, 0, 100, 100); 
        checkMethodStats(stats, "bar", 1, 0, 100, 100); 
 
        stats.methodCalled("foo", 400, false); 

4
CodeRank
Contextual code suggestions in your IDE  Get Codota for Java
See Code Examples for Android APIStatistics Methods: