Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Sep 5, 2024
1 parent 08240e2 commit 38ae934
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
if: matrix.java == '8'
run: |
./mvnw -T 4C clean test \
-Dpmd.skip=false -Dlicense.skip=false -DredisCaseEnabled=true \
-Dcheckstyle.skip=false -Dpmd.skip=false -Dlicense.skip=false -DredisCaseEnabled=true \
-e -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn;
# step 5.2
- name: "Test with Maven and Java${{ matrix.java }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public long count() {

@Override
public double tps() {
System.out.println("clock.getCurrentMilliseconds(): " + clock.getCurrentMilliseconds());
return this.value.getTps(clock.getCurrentMilliseconds());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,9 @@ public long getTotal() {
}

public double getTps(double currentMilliseconds) {
System.out
.println("currentMilliseconds: " + currentMilliseconds + " , startMilliseconds: " + startMilliseconds);
if (currentMilliseconds <= startMilliseconds) {
System.out
.println("getTps: 0");
return 0;
}
System.out
.println("total.doubleValue(): " + total.doubleValue() + " (currentMilliseconds - startMilliseconds) * 1000.0 " + (currentMilliseconds - startMilliseconds) * 1000.0);
return total.doubleValue() / (currentMilliseconds - startMilliseconds) * 1000.0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,11 @@ public void testCount() {

@Test
public void testTps() {
CompactSummary compactSummary = new CompactSummary(new Id("test"));
System.out.println("current: "+ System.currentTimeMillis());
compactSummary.increase(51111);
System.out.println("tps: "+ compactSummary.tps()+", count: "+compactSummary.count()+ " ,total:"+compactSummary.total());
compactSummary.increase(1111110);
System.out.println("tps: "+ compactSummary.tps()+", count: "+compactSummary.count()+ " ,total:"+compactSummary.total());
compactSummary.increase(111115);
System.out.println("tps: "+ compactSummary.tps()+", count: "+compactSummary.count()+ " ,total:"+compactSummary.total());
compactSummary.increase(5);
compactSummary.increase(10);
compactSummary.increase(15);
// Assuming that the time taken is 1 second
System.out.println("tps time: "+ System.currentTimeMillis());
assertTrue(compactSummary.tps() >0);
System.out.println("tps endtime: "+ System.currentTimeMillis());
}

@Test
Expand Down

0 comments on commit 38ae934

Please sign in to comment.