json schema: performance test: schema file with many definitions

but the speed of highlighting currently is not comparable with the size of the file
This commit is contained in:
Irina.Chernushina
2017-10-09 22:21:26 +02:00
committed by Irina.Chernushina
parent b307649b78
commit 6d6f61f345
2 changed files with 9143 additions and 0 deletions
@@ -0,0 +1,41 @@
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.jsonSchema;
import com.intellij.testFramework.PlatformTestUtil;
import com.intellij.util.ThrowableRunnable;
import java.util.Collections;
/**
* @author Irina.Chernushina on 10/9/2017.
*/
public class JsonSchemaPerformanceTest extends JsonSchemaHeavyAbstractTest {
public static final String BASE_PATH = "/tests/testData/jsonSchema/performance/";
@Override
protected String getBasePath() {
return BASE_PATH;
}
public void testSwaggerHighlighting() {
final ThrowableRunnable<Exception> test = () -> skeleton(new Callback() {
@Override
public void registerSchemes() {
final String moduleDir = getModuleDir(getProject());
addSchema(new UserDefinedJsonSchemaConfiguration("swagger", moduleDir + "/swagger.json", false, Collections.emptyList()));
myDoCompletion = false;
}
@Override
public void configureFiles() {
configureByFiles(null, "/swagger.json");
}
@Override
public void doCheck() {
doHighlighting();
}
});
PlatformTestUtil.startPerformanceTest(getTestName(false), 7000, test).attempts(1).usesAllCPUCores().assertTiming();
}
}
File diff suppressed because it is too large Load Diff