The user can modify the data file server to upload the address. Post uploads http protocol format file to your own server address and save PerfDog data.
As shown in the below figure, change it to your own data server address:
It needs to realize the interfaces as follows:
# Interface specification
## base path
+ The base path of upload interface. All the interfaces for uploading test data evolved from this path. When the upload service demo is not used, you need to deeply customize the upload service. For example,
If the base path is /report:
+ post /report means uploading the performance indices data
+ put /report/icon means setting the measurement reference icon
+ post /report/screenshots means the APP screenshot generated during uploading test data. It can be called many times, if there are many screenshots
+ put /report/done means uploading completed
+ This path is also used to configure the upload service address in PerfDog. The format is the general url format: http(s)://abc.com:port/report
+ http(s) -> means the protocol used for uploading. The upload service developed according to this protocol can be http/https
+ abc.com -> means the deployment address of upload service. It can be a domain name or ip address. It can be 127.0.0.1 if PerfDog and uploading are deployed on the same machine.
+ port -> means service port. It is port 80 for http and port 443 for https. The port part can be omitted. But the port needs to be entered in the other cases.
+ /report -> means the base path of upload interface.
> In this case, http protocol service is used, uploading and PerfDog are deployed together on the same machine, the port is 80, the base path is/report, the upload service address configured in PerfDog is: http://127.0.0.1/report
## Start to upload test data
+ path:
+ method: post
+ header:
* Content-Type: 'multipart/form-data'
+ req
* file_format: json/pb
* data: file
+ resp
```json
{
errCode: 0
errStr: "",
reportId: ""
}
```
> Generate performance data during uploading test, such as fps, Jank, etc.
>
## Set test APP icon
+ path: /icon
+ method: put
+ header:
* Content-Type: 'multipart/form-data'
+ req
* reportId
* icon: file
+ resp
```json
{
errCode: 0
errStr: ""
}
```
## APP screenshots generated during uploading test
+ path: /screenshots
+ method: post
+ header:
* Content-Type: 'multipart/form-data'
+ req
* reportId
* file1: file
* file2: file
* file3: file
* file4: file
* file5: file
* ...
+ resp
```json
{
errCode: 0
errStr: ""
}
```
> Can upload multiple images once or use zip to compress multiple images to upload
## Finish uploading test data
+ path: /done
+ method: put
+ header:
* Content-Type: 'multipart/form-data'
+ req
* reportId
+ resp
```json
{
errCode: 0
errStr: ""
}
```
Reference Demo: https://github.com/perfdog/report_server