@Ignore("take long time")
    @Test
    public void performanceTest() {
        Xpath2Selector xpath2Selector = new Xpath2Selector("//a");
        long time = System.currentTimeMillis();
        for (int i = 0; i < 1000; i++) {
            xpath2Selector.selectList(html);
        }
        System.out.println(System.currentTimeMillis() - time);

        XpathSelector xpathSelector = new XpathSelector("//a");
        time = System.currentTimeMillis();
        for (int i = 0; i < 1000; i++) {
            xpathSelector.selectList(html);
        }
        System.out.println(System.currentTimeMillis() - time);

        time = System.currentTimeMillis();
        for (int i = 0; i < 1000; i++) {
            xpath2Selector.selectList(html);
        }
        System.out.println(System.currentTimeMillis() - time);

        CssSelector cssSelector = new CssSelector("a");
        time = System.currentTimeMillis();
        for (int i = 0; i < 1000; i++) {
            cssSelector.selectList(html);
        }
        System.out.println("css " + (System.currentTimeMillis() - time));
    }
New api test

@author hooy
@since 8.0
webmagic-saxon/src/test/java/us/codecraft/webmagic/selector/XpathSelectorTest.java