// For complete examples and data files, please go to https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-Java
// Set metered key
Metered metered = new Metered();
metered.setMeteredKey("****", "****");
// Get consumption quantity from metered
BigDecimal amountBefor = Metered.getConsumptionQuantity();
// Call comparison
String sourcePath = Utilities.sourcePath + sourceFile;
String targetPath = Utilities.sourcePath + targetFile;
Comparer comparer = new Comparer();
comparer.compare(sourcePath, targetPath, new ComparisonSettings());
// Get consumption quantity from metered after several calls of comparison
BigDecimal amountAfter = Metered.getConsumptionQuantity();