-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[to #375] use scanRegions request to warm up client #383
[to #375] use scanRegions request to warm up client #383
Conversation
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
…storm/client-java into use-scan-regions-request-to-warm-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add some test for this PR?
|
||
private void doTest(TiConfiguration conf) throws Exception { | ||
session = TiSession.create(conf); | ||
long start = System.currentTimeMillis(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it better to use System.nanoTime()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not necessary in unit test.
doTest(conf); | ||
conf.setWarmUpEnable(false); | ||
doTest(conf); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about:
elapsedWithWarmupMS = doTest(conf)
conf.setWarmUpEnable(false);
elapsedWithoutWarmupMS = doTest(conf);
assertTrue(elapsedWithWarmupMS < elapsedWithoutWarmupMS)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@birdstorm PTAL at this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zz-jason PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
Signed-off-by: birdstorm <samuelwyf@hotmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
/run-all-tests |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-3.1 in PR #438 |
use scanRegions request with limit to warm up client.
new configurations: