Skip to content

Conversation

@yqia182
Copy link

@yqia182 yqia182 commented Feb 2, 2021

    @Override
    public int getPagePerSecond() {
        if (getStartTime() != null) {
            int runSeconds = (int) (System.currentTimeMillis() - getStartTime().getTime()) / 1000;
            if (runSeconds != 0) {
                return getSuccessPageCount() / runSeconds;
            }
        }
        return -1;
    }

增加判断逻辑,避免常见异常类型。

@sutra sutra merged commit 71b7dfb into code4craft:develop Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants