package com.shlb.timescaledbutils; import com.shlb.timescaledbutils.entity.RollerTimeData; import com.shlb.timescaledbutils.service.IRollerTimeDataService; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import java.util.List; @SpringBootTest public class RollerTimeDataTest { @Autowired private IRollerTimeDataService rollerTimeDataService; @Test public void testQueryAll() { long startTime = System.currentTimeMillis(); List list = rollerTimeDataService.list(); long endTime = System.currentTimeMillis(); long duration = endTime - startTime; System.out.println("查询耗时: " + duration + " ms"); System.out.println("查询到的记录数: " + (list != null ? list.size() : 0)); } }