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
F2192655: D4582.id14692.diff
Thu, Jul 4, 8:15 PM
F2192269: D4582.id14681.diff
Thu, Jul 4, 7:20 PM
F2191307: D4582.id14800.diff
Thu, Jul 4, 3:00 PM
Unknown Object (File)
Thu, Jul 4, 9:50 AM
Unknown Object (File)
Thu, Jul 4, 12:25 AM
Unknown Object (File)
Wed, Jul 3, 3:40 AM
Unknown Object (File)
Tue, Jul 2, 5:14 PM
Unknown Object (File)
Tue, Jul 2, 8:37 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
Lint Not Applicable
Unit
Tests Not Applicable

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.