report.setResourceId(resource1.getId());
for (Integer i = 0; i < numPackages; ++i) {
PackageDetailsKey key = new PackageDetailsKey(this.getClass().getSimpleName() + "-" + i, i.toString(),
package1.getPackageType().getName(), architecture1.getName());
ResourcePackageDetails pd = new ResourcePackageDetails(key);
report.addDeployedPackage(pd);
}
long start = System.currentTimeMillis();
contentManager.mergeDiscoveredPackages(report);
System.out.println("PERF: testInventoryMergePerf merge-1=" + (System.currentTimeMillis() - start) + "ms");
installedPackages = contentManager.findInstalledPackagesByCriteria(subjectManager.getOverlord(), criteria);
assertEquals(numPackages, installedPackages.size());
// Remove the first 100 and add 200 more
int startPackage = 100;
int endPackage = numPackages + 200;
report = new ContentDiscoveryReport();
report.setResourceId(resource1.getId());
for (Integer i = startPackage; i < endPackage; ++i) {
PackageDetailsKey key = new PackageDetailsKey(this.getClass().getSimpleName() + "-" + i, i.toString(),
package1.getPackageType().getName(), architecture1.getName());
ResourcePackageDetails pd = new ResourcePackageDetails(key);
report.addDeployedPackage(pd);
}
start = System.currentTimeMillis();
contentManager.mergeDiscoveredPackages(report);