Page MenuHomePhabricator

[services] Tests - Add PUT for Blob performance tests
ClosedPublic

Authored by karol on Jul 20 2022, 4:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 9:27 PM
Unknown Object (File)
Fri, Dec 20, 9:01 PM
Unknown Object (File)
Fri, Dec 20, 8:54 PM
Unknown Object (File)
Fri, Dec 20, 8:53 PM
Unknown Object (File)
Fri, Dec 20, 8:44 PM
Unknown Object (File)
Fri, Dec 20, 8:15 PM
Unknown Object (File)
Fri, Dec 20, 5:52 PM
Unknown Object (File)
Tue, Dec 17, 7:03 AM

Details

Summary

Depends on D4581

Adding the logic for the put operations.

Test Plan
cd services
yarn run-performance-tests blob

You may run this but running it again will result in a failed test. This is because the data are not going to be removed in the end so you'll get "the data already exists" error. In this case, you may want to run:

yarn reset-local-cloud

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

karol edited the test plan for this revision. (Show Details)
karol added reviewers: tomek, varun.
karol added inline comments.
services/commtest/tests/blob_performance_test.rs
54 ↗(On Diff #14681)

should be removed

karol edited the summary of this revision. (Show Details)

remove log line

services/commtest/tests/blob_performance_test.rs
18–21 ↗(On Diff #14692)

Indentation is weird here (I would expect lines 19 and 21 to be indented extra) but if that is the Rust formatter's opinion, then okay

tomek added inline comments.
services/commtest/tests/blob_performance_test.rs
46–50 ↗(On Diff #14692)

Is there a reason for using for instead of map?

53 ↗(On Diff #14692)

Why do we expect the data to not exist after this put?

This revision is now accepted and ready to land.Jul 21 2022, 4:52 AM
services/commtest/tests/blob_performance_test.rs
46–50 ↗(On Diff #14692)

I don't see why we would use a map here. for is the simplest and the clearest possible approach I can see. Why would we use a map here?

53 ↗(On Diff #14692)

Because at the end of this test, we remove the data, the successful test covers adding, reading, and removing the data.
This should leave the storage in the same state as it was before the test.
It's hard to tell if adding the data works properly when the data is already there, right?

You interpreted this output wrong: it's not like the "data doesn't exist after the put". This result tells us whether the data already existed before the put or it did not - only in the latter case, the data is being put in the storage.