MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ParseMetaFileName

Function ParseMetaFileName

serving/processor/storage/model_store.cc:40–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40int64 ParseMetaFileName(const std::string& fname) {
41 auto base_name = io::Basename(fname);
42 auto pos = base_name.rfind('.');
43 if (pos == StringPiece::npos)
44 return 0;
45 auto partial_name = StringPiece(base_name.data(), pos);
46 pos = partial_name.rfind('-');
47 if (pos == StringPiece::npos)
48 return 0;
49
50 auto id = StringPiece(partial_name.data() + pos + 1,
51 partial_name.size() - (pos + 1));
52
53 int64 ret = 0;
54 strings::safe_strto64(id, &ret);
55 return ret;
56}
57
58} // namespace
59

Callers 2

GetFullModelVersionMethod · 0.85
GetDeltaModelVersionMethod · 0.85

Calls 4

BasenameFunction · 0.85
safe_strto64Function · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected