MCPcopy Create free account
hub / github.com/Snapchat/djinni / returnString

Method returnString

perftest/handwritten-src/cpp/DjinniPerfBenchmarkImpl.cpp:58–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56// so that the construction cost is only paid by the first run.
57
58std::string DjinniPerfBenchmarkImpl::returnString(int32_t size) {
59 static int32_t cachedReturnValueSize;
60 static std::string cachedReturnValue;
61 if (size != cachedReturnValueSize) {
62 cachedReturnValue = std::string(size, '@');
63 cachedReturnValueSize = size;
64 }
65 return cachedReturnValue;
66}
67
68std::vector<uint8_t> DjinniPerfBenchmarkImpl::returnBinary(int32_t size) {
69 static int32_t cachedReturnValueSize;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected