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

com.jetbrains.pluginverifier.tasks.profiling.PluginVerificationProfilings.kt Maven / Gradle / Ivy

Go to download

Command-line interface for JetBrains Plugin Verifier with set of high-level tasks for plugin and IDE validation

There is a newer version: 1.379
Show newest version
package com.jetbrains.pluginverifier.tasks.profiling

import com.jetbrains.pluginverifier.tasks.TaskResult
import java.time.Duration
import java.util.concurrent.atomic.AtomicReference
import kotlin.system.measureTimeMillis

fun measurePluginVerification(measuredBlock: (Unit) -> TaskResult): MeasuredResult {
  val result = AtomicReference()
  val durationInMillis: Long = measureTimeMillis {
    result.set(measuredBlock.invoke(Unit))
  }
  return MeasuredResult(result.get(), Duration.ofMillis(durationInMillis))
}

data class MeasuredResult(val taskResult: TaskResult, val duration: Duration)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy