MCPcopy Create free account
hub / github.com/Snapchat/Valdi / MmapModuleArchiveFixture

Class MmapModuleArchiveFixture

valdi/test/integration/MmapModuleArchive_tests.cpp:168–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166 void emitUserSessionReadyLatency(const MetricsDuration&) override {}
167 void emitAssetsDownloadSuccess(const StringBox&) override {}
168 void emitAssetsDownloadFailure(const StringBox&) override {}
169 void emitAssetsCacheHit(const StringBox&) override {}
170 void emitAssetsCacheMiss(const StringBox&) override {}
171 void emitUncaughtError(const StringBox&) override {}
172 void emitUncaughtError() override {}
173 void emitOnScrollLatency(const StringBox&, const StringBox&, const MetricsDuration&) override {}
174 void emitSlowAsyncJsCall(const StringBox&, const MetricsDuration&) override {}
175 void emitSlowSyncJsCallThreshold(const StringBox&, const MetricsDuration&) override {}
176};
177
178class TemporaryDirectory {
179public:
180 TemporaryDirectory() {
181 char dir[] = "/tmp/.valdi_mmap_integ.XXXXXX";
182 if (mkdtemp(dir) == nullptr) {
183 throw Exception(STRING_FORMAT("mkdtemp failed: {}", strerror(errno)));
184 }
185 _path = STRING_LITERAL(dir);
186 }
187 ~TemporaryDirectory() {
188 DiskUtils::remove(Path(_path.toStringView()));
189 }
190 Path path() const {
191 return Path(_path.toStringView());
192 }
193
194private:
195 StringBox _path;
196};
197
198// ---------------------------------------------------------------------------
199// Test fixture
200// ---------------------------------------------------------------------------
201

Callers

nothing calls this directly

Calls 5

toSharedMethod · 0.80
getFunction · 0.50
setEnabledMethod · 0.45
setMetricsMethod · 0.45
setRuntimeTweaksMethod · 0.45

Tested by

no test coverage detected