You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/03/22 12:47:57 UTC

[GitHub] [skywalking] kezhenxu94 edited a comment on pull request #8725: Add data-generator module to run OAP in testing mode, generating mock data for testing

kezhenxu94 edited a comment on pull request #8725:
URL: https://github.com/apache/skywalking/pull/8725#issuecomment-1075129299


   Some examples
   
   <details>
     <summary>Submit a task to generate segments</summary>
   
     ```shell
   
   ### Submit a task to generate mock segment data, 100 segments per seconds
   
   POST http://localhost:12800/mock-data/segments/tasks?qps=100
   Content-Type: application/json
   
   {
       "traceId": {
           "type": "randomString",
           "length": "20",
           "letters": true,
           "numbers": true
       },
       "serviceInstanceId": {
           "type": "randomString",
           "length": "10",
           "letters": true,
           "numbers": true
       },
       "dataBinary": {
           "type": "randomString",
           "length": "10",
           "prefix": "test",
           "letters": true,
           "numbers": true
       },
       "segmentId": {
           "type": "randomString",
           "length": "20",
           "letters": true,
           "numbers": true
       },
       "serviceId": {
           "type": "randomString",
           "length": "10",
           "letters": true,
           "numbers": true
       },
       "endpointId": {
           "type": "randomString",
           "length": "10",
           "prefix": "test_",
           "letters": true,
           "numbers": true,
           "domainSize": 10 // at most 10 different `endpointId`s will be generated in this task
       },
       "startTime": {
           "type": "randomInt",
           "min": "1647868381000",
           "max": "1647878402000"
       },
       "latency": {
           "type": "randomInt",
           "min": 100,
           "max": 1000
       },
       "error": {
           "type": "randomInt",
           "min": "0",
           "max": "1"
       },
       "tags": {
           "type": "randomList",
           "size": 5,
           "item": {
               "key": {
                   "type": "randomString",
                   "length": "10",
                   "prefix": "test",
                   "letters": true,
                   "numbers": true,
                   "domainSize": 10 // At most 10 different tag key will generated in this task
               },
               "value": {
                   "type": "randomString",
                   "length": "10",
                   "prefix": "test",
                   "letters": true,
                   "numbers": true
               }
           }
       }
   }
     ```
   
   </details>
   
   <details>
     <summary>Cancel the segment generating task</summary>
   
     ```shell
   ### Cancel the task, with the requestId return from the previous request
   DELETE http://localhost:12800/mock-data/segments/tasks?requestId=8bbdaee6-2193-405d-bc0c-a650cd17597e
   
     ```
   
   </details>
   
   <details>
     <summary>List all segment tasks</summary>
   
     ```shell
   ### List all tasks that are now running
   GET http://localhost:12800/mock-data/segments/tasks
     ```
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org