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

Function normalize

src/linux/perf.cpp:68–72  ·  view source on GitHub ↗

Normalize a perf event name. After normalization the event name should match an event field in the PerfStatistics protobuf.

Source from the content-addressed store, hash-verified

66// Normalize a perf event name. After normalization the event name
67// should match an event field in the PerfStatistics protobuf.
68inline string normalize(const string& s)
69{
70 string lower = strings::lower(s);
71 return strings::replace(lower, "-", "_");
72}
73
74
75// Executes the 'perf' command using the supplied arguments, and

Callers 1

parseMethod · 0.70

Calls 2

lowerFunction · 0.85
replaceFunction · 0.85

Tested by

no test coverage detected