aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs167/pr296533/testing/TestRunner.java
blob: 4263cfe1129093b4a81a490fa397b81de8f5d1c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package testing;

import java.lang.reflect.Method;

public class TestRunner {

	public static void main(String[] args) {
		ResourceManager manager = new ResourceManager();
		ResourceCache cache = ResourceCache.aspectOf();
		
		Resource r1_1 = manager.lookupResource("1");
		Resource r1_2 = manager.lookupResource("1");
		Resource r1_3 = manager.lookupResource("1");
		Resource r1_4 = manager.lookupResource("1");
		Resource r1_5 = manager.lookupResource("1");
		
		Resource r2_1 = manager.lookupResource("2");
		Resource r2_2 = manager.lookupResource("2");

		System.out.println("Cache hits: " + cache.getHitCount());
		System.out.println("Cache hits: " + cache.getMissCount());
	}

}