Skip to content

Can't see the timing output #27

@neodix42

Description

@neodix42

Hi,
I can't see the timing output in my test. Test uses SLF4j already.

@Slf4j
@RunWith(JUnit4.class)
public class TestMyClass {

  @Test
  public void testMethod() {
   Block b = Block.deserialize(...);
  }
}

and the deserialize() has annotation (also tried non static method):

  @TimerNinjaTracker
  public static Block deserialize(CellSlice cs) {
     //work
  }

Below is my Maven setup.

Also tried to output to the console, but no luck:

TimerNinjaConfiguration.getInstance().toggleSystemOutLog(true);

Adding log4j.properties also didn't help.

Could you please advise on how to proceed?

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>1.5.18</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>2.0.17</version>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>1.9.7</version>
    </dependency>
    <dependency>
        <groupId>io.github.thanglequoc</groupId>
        <artifactId>timer-ninja</artifactId>
        <version>1.0.3</version>
        <scope>compile</scope>
    </dependency>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.15.0</version>
                <configuration>
                    <complianceLevel>11</complianceLevel>
                    <source>11</source>
                    <target>11</target>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>io.github.thanglequoc</groupId>
                            <artifactId>timer-ninja</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions