public final class CorpusRunner extends Object
Run record layout (a published contract for --diff-run /
--diff-baseline / --backlog):
{ "version": "prettyscore-run/0.1", "vendor", "profile", "engines": [...],
"entries": [ {file, engine, source: clean|degraded, degrade, parse_ok, gate_passed,
score, attainable, ratio, dimensions: {id: score}, findings: [...], formatted} ],
"summary": { "": {files, scored, mean_score, mean_ratio, min_ratio, gate_failures, parse_failures},
"degraded": {samples, pp2_recovery_ratio, pp2_gate_failures} } }
| Modifier and Type | Field and Description |
|---|---|
static String |
RUN_VERSION |
| Constructor and Description |
|---|
CorpusRunner(EDbVendor vendor,
ScoreProfile profile,
boolean keepText) |
CorpusRunner(EDbVendor vendor,
ScoreProfile profile,
boolean keepText,
boolean astEnabled) |
| Modifier and Type | Method and Description |
|---|---|
static List<File> |
readManifest(File manifest,
File sqldir)
Read a manifest: non-empty, non-comment lines are paths relative to
sqldir. |
static String |
readText(File f) |
Map<String,Object> |
run(List<File> files,
List<String> engines,
int degradeCount,
long seed,
File relativeTo) |
Map<String,Object> |
scoreOne(String name,
String engine,
String source,
String degrade,
String sql)
Format
sql with engine and score it against the original. |
static Map<String,Object> |
summarize(List<Object> entries,
List<String> engines) |
public static final String RUN_VERSION
public CorpusRunner(EDbVendor vendor, ScoreProfile profile, boolean keepText)
public CorpusRunner(EDbVendor vendor, ScoreProfile profile, boolean keepText, boolean astEnabled)
public static List<File> readManifest(File manifest, File sqldir) throws IOException
sqldir.IOExceptionpublic static String readText(File f) throws IOException
IOExceptionpublic Map<String,Object> run(List<File> files, List<String> engines, int degradeCount, long seed, File relativeTo)
files - the corpus filesengines - "pp" and/or "pp2"degradeCount - number of syntax-degraded samples to derive (0 = none); scored with pp2 onlyseed - degrader seedpublic Map<String,Object> scoreOne(String name, String engine, String source, String degrade, String sql)
sql with engine and score it against the original.