Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve timestamps #20

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Improve timestamps #20

wants to merge 8 commits into from

Conversation

DaJeZi
Copy link
Contributor

@DaJeZi DaJeZi commented Nov 30, 2023

No description provided.

# Conflicts:
#	src/main/java/de/rub/nds/anvilcore/execution/TestRunner.java
#	src/main/java/de/rub/nds/anvilcore/teststate/AnvilTestRun.java
capture-network-traffic into improve-timestamps
capture-network-traffic into improve-timestamps
pom.xml Outdated
@@ -8,7 +8,7 @@
</parent>
<groupId>de.rub.nds</groupId>
<artifactId>anvil-core</artifactId>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.3</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version number should always be left as is at snapshot

return startInputGenerationTimes;
}

public synchronized Date getStartInputGenerationTime(String k) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use descirptive parameter names

@@ -98,11 +99,16 @@ public void runTests() {
(MethodBasedTestDescriptor) descriptor;
Method method = md.getTestMethod();
String anvilTestId = null;
try {
if (method.getAnnotation(AnvilTest.class) != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alwys use curly braces for if/else statement blocks

@@ -314,7 +327,7 @@ public void executionFinished(
public void logTestFinished(
TestExecutionResult testExecutionResult, TestIdentifier testIdentifier) {
if (testExecutionResult.getThrowable().isPresent() && testIdentifier.isContainer()) {
LOGGER.error(
LOGGER.info(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the change?

@@ -183,8 +195,28 @@ public void finish() {
scoreContainer.updateForResult(result);
AnvilContext.getInstance()
.addTestResult(result, testClass.getName() + "." + testMethod.getName());
AnvilContext.getInstance().getMapper().saveTestRunToPath(this);
// AnvilContext.getInstance().testFinished(uniqueId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete uncommented code

.getEndInputGenerationTimes()
.get(this.testMethod.toString());
this.setStartInputGenerationTime(startInputGenerationTimes);
this.setEndInputGenerationTime(endInputGenerationTimes);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change it from date to seconds elapsed? Attrbutes could be named like "generationTimeSeconds" and "executionTimeSeconds"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants