广丰卷烟厂数采质量分析系统
zhuguifei
7 天以前 6990c6f4934e6062b07f1fa9471c2b98d4077729
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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<RollerTimeData> list = rollerTimeDataService.list();
 
        long endTime = System.currentTimeMillis();
        long duration = endTime - startTime;
        
        System.out.println("查询耗时: " + duration + " ms");
        System.out.println("查询到的记录数: " + (list != null ? list.size() : 0));
    }
}