MCPcopy Create free account
hub / github.com/apache/mesos / valid

Function valid

src/linux/perf.cpp:324–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323
324bool valid(const set<string>& events)
325{
326 vector<string> argv = {"stat"};
327
328 foreach (const string& event, events) {
329 argv.push_back("--event");
330 argv.push_back(event);
331 }
332
333 argv.push_back("true");
334
335 internal::Perf* perf = new internal::Perf(argv);
336 Future<string> output = perf->output();
337 spawn(perf, true);
338
339 output.await();
340
341 // We don't care about the output, just whether it exited non-zero.
342 return output.isReady();
343}
344
345
346struct Sample

Callers 2

TEST_FFunction · 0.85
createMethod · 0.85

Calls 4

outputMethod · 0.80
isReadyMethod · 0.80
spawnFunction · 0.50
awaitMethod · 0.45

Tested by 1

TEST_FFunction · 0.68