getBenchmarkInfo method

Future<BenchmarkInfo> getBenchmarkInfo()

Gets benchmark information from the conversation.

Implementation

Future<BenchmarkInfo> getBenchmarkInfo() {
  final handle = _handle;
  if (handle == null) {
    throw const LiteRtLmException('Conversation is already disposed.');
  }
  if (!ExperimentalFlags.enableBenchmark) {
    throw const LiteRtLmException(
      'Please enable the flag by setting ExperimentalFlags.enableBenchmark to true before initializing the Engine.',
    );
  }
  return LiteRtLmNativeRuntime.instance.getBenchmarkInfo(handle);
}