| 1876 | |
| 1877 | |
| 1878 | static Try<Operation> parseOperation(const string& s) |
| 1879 | { |
| 1880 | if (s == "Total") { |
| 1881 | return Operation::TOTAL; |
| 1882 | } else if (s == "Read") { |
| 1883 | return Operation::READ; |
| 1884 | } else if (s == "Write") { |
| 1885 | return Operation::WRITE; |
| 1886 | } else if (s == "Sync") { |
| 1887 | return Operation::SYNC; |
| 1888 | } else if (s == "Async") { |
| 1889 | return Operation::ASYNC; |
| 1890 | } else if (s == "Discard") { |
| 1891 | return Operation::DISCARD; |
| 1892 | } |
| 1893 | |
| 1894 | return Error("Invalid Operation value: '" + s + "'"); |
| 1895 | } |
| 1896 | |
| 1897 | |
| 1898 | Try<Value> Value::parse(const string& s) |