mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
[full-line] CompletionModelBenchmark useCache -> resetCache (IJ-MR-99925)
GitOrigin-RevId: 5c935dc08089f307fc63d6a62c92c4765376ba65
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6682cde0ff
commit
d440348b09
@@ -43,8 +43,8 @@ public class CompletionModelBenchmark {
|
||||
@Param({"0", "5", "50", "1000"})
|
||||
public int shiftContext;
|
||||
|
||||
@Param({"false", "true"})
|
||||
public boolean useCache;
|
||||
@Param({"true", "false"})
|
||||
public boolean resetCache;
|
||||
|
||||
private String filename;
|
||||
|
||||
@@ -70,14 +70,14 @@ public class CompletionModelBenchmark {
|
||||
prefix = helper.randomPrefix(prefixLen);
|
||||
context = helper.continueContextRandomly(context, contextTextLen, shiftContext);
|
||||
config = helper.getConfig(maxLen, filename);
|
||||
if (!useCache) {
|
||||
if (resetCache) {
|
||||
helper.resetCache();
|
||||
}
|
||||
}
|
||||
|
||||
@TearDown(Level.Invocation)
|
||||
public void teardown() {
|
||||
if (useCache) {
|
||||
if (!resetCache) {
|
||||
if (shiftContext <= 10) {
|
||||
assert helper.getCacheHits() > 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user