com.maxmind.db.InvalidDatabaseException Java Examples

The following examples show how to use com.maxmind.db.InvalidDatabaseException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Benchmark.java    From MaxMind-DB-Reader-java with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws IOException, InvalidDatabaseException {
    File file = new File(args.length > 0 ? args[0] : "GeoLite2-City.mmdb");
    System.out.println("No caching");
    loop("Warming up", file, WARMUPS, NoCache.getInstance());
    loop("Benchmarking", file, BENCHMARKS, NoCache.getInstance());

    System.out.println("With caching");
    loop("Warming up", file, WARMUPS, new CHMCache());
    loop("Benchmarking", file, BENCHMARKS, new CHMCache());
}