Unexpected exception: /tmp/QuickPerf-7265351587637478002/allocation.ser (No such file or directory)

Open
#218 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java

Research direction

Reproduce the failure with the Quarkus 3.8.2 demo and the shown GreetingResourceTest. Start at org.quickperf.repository.ObjectInputStreamBuilder and follow the call chain through LongFileRepository, AllocationRepository, and ByteWatcherRecorder. Done means the test runs without the unexpected FileNotFoundException and the reported allocation check still completes.

Written by the indexing model from the issue text.

Description

:bug: bug

Hello I've tried a simple quarkus 3.8.2 demo application and got the error:

Stack trace
java.lang.IllegalStateException: java.io.FileNotFoundException: /tmp/QuickPerf-7265351587637478002/allocation.ser (No such file or directory)
	at org.quickperf.repository.ObjectInputStreamBuilder.buildFileInputStream(ObjectInputStreamBuilder.java:46)
	at org.quickperf.repository.ObjectInputStreamBuilder.buildObjectInputStream(ObjectInputStreamBuilder.java:28)
	at org.quickperf.repository.LongFileRepository.retrieveLongValueFromFile(LongFileRepository.java:42)
	at org.quickperf.repository.LongFileRepository.find(LongFileRepository.java:37)
	at org.quickperf.jvm.allocation.AllocationRepository.findAllocation(AllocationRepository.java:32)
	at org.quickperf.jvm.allocation.bytewatcher.ByteWatcherRecorder.findRecord(ByteWatcherRecorder.java:45)
	at org.quickperf.jvm.allocation.bytewatcher.ByteWatcherRecorder.findRecord(ByteWatcherRecorder.java:19)
	at org.quickperf.issue.PerfIssuesEvaluator.findPerfRecord(PerfIssuesEvaluator.java:91)
	at org.quickperf.issue.PerfIssuesEvaluator.buildPerfRecordByAnnotation(PerfIssuesEvaluator.java:81)
	at org.quickperf.issue.PerfIssuesEvaluator.evaluatePerfIssuesIfNoJvmIssueWithPotentialUnexpectedException(PerfIssuesEvaluator.java:59)
	at org.quickperf.issue.PerfIssuesEvaluator.evaluatePerfIssuesIfNoJvmIssue(PerfIssuesEvaluator.java:38)
	at org.quickperf.junit5.QuickPerfTestExtension.processJvmOrTestIssue(QuickPerfTestExtension.java:164)
	at org.quickperf.junit5.QuickPerfTestExtension.interceptTestMethod(QuickPerfTestExtension.java:130)
	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
	at org.junit.jupi

code

package org.acme;

import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import org.quickperf.junit5.QuickPerfTest;
import org.quickperf.jvm.allocation.AllocationUnit;
import org.quickperf.jvm.annotations.ExpectMaxHeapAllocation;
import org.quickperf.jvm.annotations.MeasureHeapAllocation;

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;

@QuickPerfTest
@QuarkusTest
class GreetingResourceTest {


    @MeasureHeapAllocation
    @ExpectMaxHeapAllocation(value = 1, unit = AllocationUnit.GIGA_BYTE)
    @Test
    void testHelloEndpoint() {
        given()
          .when().get("/hello")
          .then()
             .statusCode(200)
             .body(is("Hello s e a"));
    }

}
Dominant language
Java
Stars
541
Forks
73
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quick-perf/quickperf

All issues in quick-perf/quickperf

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.