| 2237 | |
| 2238 | |
| 2239 | Try<Duration> cfs_quota_us( |
| 2240 | const string& hierarchy, |
| 2241 | const string& cgroup) |
| 2242 | { |
| 2243 | Try<string> read = cgroups::read(hierarchy, cgroup, "cpu.cfs_quota_us"); |
| 2244 | |
| 2245 | if (read.isError()) { |
| 2246 | return Error(read.error()); |
| 2247 | } |
| 2248 | |
| 2249 | return Duration::parse(strings::trim(read.get()) + "us"); |
| 2250 | } |
| 2251 | |
| 2252 | |
| 2253 | Try<Nothing> cfs_quota_us( |