[full-line] CompletionModelBenchmark useCache -> resetCache (IJ-MR-99925)

GitOrigin-RevId: 5c935dc08089f307fc63d6a62c92c4765376ba65
This commit is contained in:
petr.surkov
2022-12-09 11:50:24 +01:00
committed by intellij-monorepo-bot
parent 6682cde0ff
commit d440348b09

View File

@@ -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;
}