[evaluation-plugin] LME-66 Remove redundant session count in chunks

GitOrigin-RevId: b13b5d73d5944c0eb97e460b0a5814c70eb1ed60
This commit is contained in:
Roman Vasiliev
2024-10-17 16:10:04 +00:00
committed by intellij-monorepo-bot
parent 54c811eba7
commit 988e51ec3f
4 changed files with 1 additions and 5 deletions
@@ -67,7 +67,6 @@ class CsvDataset(
result += object : EvaluationDatasetChunk {
override val datasetName: String = this@CsvDataset.datasetRef.name
override val name: String = "$datasetName:${offset - rows.size + 1}-${offset}"
override val sessionCount: Int = calls.size
override val presentationText: String = presentationText.toString()
override fun evaluate(
@@ -87,7 +86,7 @@ class CsvDataset(
val session = featureInvoker.callFeature(call.expectedText, call.offset, call.nodeProperties)
sessions += session
sessionHandler(session)
if (handler.onSessionFinished(name, sessionCount - sessions.size)) {
if (handler.onSessionFinished(name, calls.size - sessions.size)) {
break
}
}
@@ -28,7 +28,6 @@ interface EvaluationDataset { // FIXME with implicit invoker inside it may make
interface EvaluationDatasetChunk {
val datasetName: String
val name: String
val sessionCount: Int
val presentationText: String
fun evaluate(
@@ -235,7 +235,6 @@ open class ProjectActionsDataset(
) : EvaluationDatasetChunk {
override val datasetName: String = config.projectName
override val name: String = fileActions.path
override val sessionCount: Int = fileActions.sessionsCount
override fun evaluate(
handler: InterpretationHandler,
@@ -36,7 +36,6 @@ class ConflictDataset(
private inner class ConflictChunk(
private val conflictPath: Path,
override val sessionCount: Int = 1 // FIXME we should pre-calculate it?
) : EvaluationDatasetChunk {
override val datasetName: String = datasetRef.name
override val name: String = conflictPath.fileName.toString()