use of io.codekvast.javaagent.model.v2.CodeBaseEntry2 in project codekvast by crispab.
the class ImportDAOImpl method updateIncompleteMethods.
private void updateIncompleteMethods(long customerId, long publishedAtMillis, Collection<CodeBaseEntry2> entries, Set<String> incompleteMethods, Map<String, Long> existingMethods, Set<Long> incompleteInvocations) {
long startedAtMillis = System.currentTimeMillis();
int count = 0;
for (CodeBaseEntry2 entry : entries) {
long methodId = existingMethods.get(entry.getSignature());
if (incompleteMethods.contains(entry.getSignature()) || incompleteInvocations.contains(methodId)) {
logger.debug("Updating {}", entry.getSignature());
jdbcTemplate.update(new UpdateIncompleteMethodStatement(customerId, publishedAtMillis, entry));
count += 1;
}
}
logger.debug("Updated {} incomplete methods in {} ms", count, System.currentTimeMillis() - startedAtMillis);
}
use of io.codekvast.javaagent.model.v2.CodeBaseEntry2 in project codekvast by crispab.
the class CodeBasePublication2Test method should_transform_from_v1_format.
@SuppressWarnings("deprecation")
@Test
public void should_transform_from_v1_format() {
CodeBasePublication pub1 = CodeBasePublication.builder().commonData(CommonPublicationData.sampleCommonPublicationData()).entries(Collections.singletonList(CodeBaseEntry.sampleCodeBaseEntry())).overriddenSignatures(Collections.singletonMap("key1", "value1")).strangeSignatures(Collections.singletonMap("key2", "value2")).build();
CodeBasePublication2 pub2 = CodeBasePublication2.fromV1Format(pub1);
assertThat(pub2.getCommonData(), is(CommonPublicationData2.sampleCommonPublicationData()));
assertThat(pub2.getEntries(), hasItems(CodeBaseEntry2.sampleCodeBaseEntry()));
}
Aggregations