tencent cloud

Performance Testing Service

Runtime Metadata

PDF
Focus Mode
Font Size
Last updated: 2025-03-10 16:46:59
In script mode, metadata generated during the performance testing can be obtained through the metadata module.

Metadata Field Description

Metadata Field
Metadata Description
userID
UIN of the user who executes the performance testing.
appID
App ID of the user who executes the performance testing.
scenarioID
Scenario ID of the performance testing task.
jobID
Performance testing task ID.
region
Region to which the engine belongs. The values for each region are as follows:
Guangzhou: ap-guangzhou.
Shanghai: ap-shanghai.
Beijing: ap-beijing.
Nanjing: ap-nanjing
Chengdu:ap-chengdu

Example

Obtain the Metadata object by calling metadata() and obtain metadata through attributes of the Metadata object. A basic example is as follows:
// get metadata
import { metadata } from 'pts'
var meta = metadata()

export default function () {
console.log(meta.userID) // 123456
console.log(meta.appID) // 123456
console.log(meta.scenarioID) // scenario-123456
console.log(meta.jobID) // job-123456
console.log(meta.region) // ap-guangzhou
}
Note:
For more detailed API documentation, see pts.metadata.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback