If this function returns non-NULL, the caller must fill the returned object and submit it for later dumping by calling SubmitSample(). If the caller ignores non-NULL return value, the object is leaked.
| 65 | // object and submit it for later dumping by calling SubmitSample(). If |
| 66 | // the caller ignores non-NULL return value, the object is leaked. |
| 67 | inline SampledRequest* AskToBeSampled() { |
| 68 | extern bvar::CollectorSpeedLimit g_rpc_dump_sl; |
| 69 | if (!FLAGS_rpc_dump || !bvar::is_collectable(&g_rpc_dump_sl)) { |
| 70 | return NULL; |
| 71 | } |
| 72 | return new (std::nothrow) SampledRequest; |
| 73 | } |
| 74 | |
| 75 | // Read samples from dumped files in a directory. |
| 76 | // Example: |
no test coverage detected