Package one.nio.os.perf
Class Perf
- java.lang.Object
-
- one.nio.os.perf.Perf
-
public class Perf extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intANY_CPUstatic intANY_PIDstatic intCURRENT_PIDstatic booleanIS_SUPPORTED
-
Constructor Summary
Constructors Constructor Description Perf()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose(int fd)static PerfCounteropen(PerfEvent event, int pid, int cpu, PerfOption... options)static PerfCounteropen(PerfEvent event, String cgroup, int cpu, PerfOption... options)static intopenFile(String fileName)static PerfCounterGlobalopenGlobal(PerfEvent event, int pid, PerfOption... options)
-
-
-
Field Detail
-
IS_SUPPORTED
public static final boolean IS_SUPPORTED
-
CURRENT_PID
public static final int CURRENT_PID
- See Also:
- Constant Field Values
-
ANY_PID
public static final int ANY_PID
- See Also:
- Constant Field Values
-
ANY_CPU
public static final int ANY_CPU
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public static PerfCounter open(PerfEvent event, int pid, int cpu, PerfOption... options) throws IOException
- Throws:
IOException
-
open
public static PerfCounter open(PerfEvent event, String cgroup, int cpu, PerfOption... options) throws IOException
- Throws:
IOException
-
openGlobal
public static PerfCounterGlobal openGlobal(PerfEvent event, int pid, PerfOption... options) throws IOException
- Throws:
IOException
-
openFile
public static int openFile(String fileName) throws IOException
- Throws:
IOException
-
close
public static void close(int fd)
-
-