static */
| 50 | |
| 51 | /* static */ |
| 52 | string Rendezvous::CreateKey(const string& src_device, uint64 src_incarnation, |
| 53 | const string& dst_device, const string& name, |
| 54 | const FrameAndIter& frame_iter) { |
| 55 | // NOTE: ';' is not used in the device name's job name. |
| 56 | // |
| 57 | // We include both sender and receiver in the key to facilitate |
| 58 | // debugging. For correctness, we only need to encode the receiver. |
| 59 | // |
| 60 | // "src_incarnation" is used to distinguish a worker when it |
| 61 | // restarts. |
| 62 | char buf[strings::kFastToBufferSize]; |
| 63 | return strings::StrCat( |
| 64 | src_device, ";", strings::Uint64ToHexString(src_incarnation, buf), ";", |
| 65 | dst_device, ";", name, ";", frame_iter.frame_id, ":", frame_iter.iter_id); |
| 66 | } |
| 67 | |
| 68 | // Return the prefix of "*s" up to the next occurrence of "delim", or |
| 69 | // the whole remaining string if "delim" is not found. "*s" is advanced |
nothing calls this directly
no test coverage detected