IRPCTest.DownloadTestFile_Begin
Vault API / standard read session idempotent returns metadata structure version
Creates a file of random bytes on the server and opens a download session for it, for measuring download throughput.
| Service | Connection and health checks MFiles.IRPCTest |
|---|---|
| gRPC method | /MFiles.IRPCTest/DownloadTestFile_Begin |
| HTTP (mf-http-grpc) | POST /grpc/v1/download-test-file_-begin |
| Request | DownloadTestFile_BeginRequest |
| Response | DownloadTestFile_BeginResponse |
| Book and level | Vault API, standard |
| Kind | read |
| Session | Required: the session ID from LogIn in the mfiles-session-id-bin metadata. |
| Idempotent | yes |
| Returns metadata structure version | yes (in the mfiles-metadata-version-bin trailer) |
| Streaming | none (unary) |
Remarks
Needs a vault session. Without a session the call fails with UNAUTHENTICATED; a server-level
session fails with E_MFILES_LOGIN_REQUIRED. file_size must be from 0 to 52428800 (50 MiB);
other values fail with E_INVALIDARG ("The parameter is incorrect.").
The server writes file_size random bytes to a temporary file of the vault; the content differs
on every call and does not compress. Read it like any other download:
- Call this method and keep
download_id. - Read the blocks with
DownloadFile_ReadBlock, at most
4 MiB per call, and time those calls. Creating the file is part of this method, not of the
reads (on a local server,
DownloadTestFile_Beginfor 50 MiB took about 200 ms). - Close the session with
DownloadFile_Stop. When the file was read
in order and the last read returned fewer bytes than requested, the server has already closed
the session;
DownloadFile_Stopstill succeeds.
The response carries only download_id.
Request: DownloadTestFile_BeginRequest
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
file_size | int64 | The size of the test file in bytes, 0 to 52428800 (50 MiB). |
Response: DownloadTestFile_BeginResponse
Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.
| Field | Type | Description |
|---|---|---|
download_id | int32 | The download session for DownloadFile_ReadBlock and DownloadFile_Stop. Valid only with the session that started it. |
Related methods
- IRPCObjectOperations.DownloadFile_ReadBlock -- Reads a block of a file from a download session.
- IRPCObjectOperations.DownloadFile_Stop -- Closes a download session.