We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime metrics:
We can follow the same path as OpenTelemetry Java does and retrieve metrics using MXBeans.
https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2136/files
scala-native/scala-native#4018
CPU: linux, macos, windows.
The text was updated successfully, but these errors were encountered:
Scala Native CPU time:
def getProcessCpuTime(): Long = { import scala.scalanative.meta.LinktimeInfo import scala.scalanative.unsafe._ if (LinktimeInfo.isWindows) { import scala.scalanative.windows.MinWinBaseApi.FileTimeStruct import scala.scalanative.windows.ProcessThreadsApi import scala.scalanative.windows.MinWinBaseApiOps._ val creationTime = stackalloc[FileTimeStruct]() val exitTime = stackalloc[FileTimeStruct]() val kernelTime = stackalloc[FileTimeStruct]() val userTime = stackalloc[FileTimeStruct]() val success = ProcessThreadsApi.GetProcessTimes( ProcessThreadsApi.GetCurrentProcess(), creationTime, exitTime, kernelTime, userTime ) if (success) { val totalTime = kernelTime.fileTime + userTime.fileTime totalTime.toLong * FileTimeOps.EpochInterval } else { -1L } } else { import scala.scalanative.posix.sys.resource._ import scala.scalanative.posix.sys.resourceOps._ import scala.scalanative.posix.sys.timeOps._ val usage = stackalloc[rusage]() if (getrusage(RUSAGE_SELF, usage) == 0) { val micros = usage.ru_utime.tv_sec * 1000 * 1000 + usage.ru_utime.tv_usec + usage.ru_stime.tv_sec * 1000 * 1000 + usage.ru_stime.tv_usec micros.toLong * 1000 } else { -1L } } }
Sorry, something went wrong.
Scala Native 0.5.5(6) will provide access to MemoryMXBean. But we need to wait for cats-effect to catch up.
JVM: typelevel/otel4s-experimental#9
No branches or pull requests
Runtime metrics:
JVM
We can follow the same path as OpenTelemetry Java does and retrieve metrics using MXBeans.
Scala.js
https://github.com/open-telemetry/opentelemetry-js-contrib/pull/2136/files
Scala Native
scala-native/scala-native#4018
CPU: linux, macos, windows.
The text was updated successfully, but these errors were encountered: