MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / isRoot

Method isRoot

test/one/profiler/test/TestProcess.java:265–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263 }
264
265 private boolean isRoot() {
266 try (Stream<String> lines = Files.lines(Paths.get("/proc/self/status"))) {
267 return lines.anyMatch(s -> s.startsWith("Uid:") && s.matches("Uid:\\s+0\\s+0.*"));
268 } catch (IOException e) {
269 return false;
270 }
271 }
272
273 @Override
274 public void close() {

Callers 1

profileMethod · 0.95

Calls 2

getMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected