All Downloads are FREE. Search and download functionalities are using the official Maven repository.

stioner.lib.2024.8.0.source-code.Settings.kt Maven / Gradle / Ivy

There is a newer version: 2024.9.0
Show newest version
package edu.illinois.cs.cs125.questioner.lib

import io.github.cdimascio.dotenv.Dotenv
import kotlinx.coroutines.sync.Semaphore

internal const val MAX_INDIVIDUAL_ALLOCATION_BYTES: Long = 1024 * 1024
internal const val MIN_ALLOCATION_FAILURE_BYTES: Long = 2 * 1024 // Account for nondeterminism due to JIT
internal const val MIN_ALLOCATION_LIMIT_BYTES: Long = 2 * 1024 * 1024 // Leave room for concat in println debugging

internal val dotenv: Dotenv = Dotenv.configure().ignoreIfMissing().load()
internal val questionerMaxConcurrency = dotenv.get("QUESTIONER_MAX_CONCURRENCY")?.toInt() ?: Int.MAX_VALUE
internal val testingLimiter = Semaphore(questionerMaxConcurrency)

internal const val QUESTIONER_DEFAULT_TEST_TIMEOUT_MS = 80L
internal val questionerTestTimeoutMS =
    dotenv.get("QUESTIONER_TEST_TIMEOUT_MS")?.toLong() ?: QUESTIONER_DEFAULT_TEST_TIMEOUT_MS
internal const val QUESTIONER_DEFAULT_TESTTEST_TIMEOUT_MS = 160L
internal val questionerTestTestTimeoutMS =
    dotenv.get("QUESTIONER_TESTTEST_TIMEOUT_MS")?.toLong() ?: QUESTIONER_DEFAULT_TESTTEST_TIMEOUT_MS
internal const val QUESTIONER_DEFAULT_WALL_CLOCK_TIMEOUT_MULTIPLIER = 32
internal val questionerWallClockTimeoutMultiplier =
    dotenv.get("QUESTIONER_WALL_CLOCK_TIMEOUT_MULTIPLIER")?.toInt() ?: QUESTIONER_DEFAULT_WALL_CLOCK_TIMEOUT_MULTIPLIER
internal const val QUESTIONER_DEFAULT_WARM_JENISOL_TIMEOUT_MULTIPLIER = 4.0
internal val questionerWarmJenisolTimeoutMultiplier =
    dotenv.get("QUESTIONER_WARM_JENISOL_TIMEOUT_MULTIPLIER")?.toDouble()
        ?: QUESTIONER_DEFAULT_WARM_JENISOL_TIMEOUT_MULTIPLIER




© 2015 - 2024 Weber Informatics LLC | Privacy Policy