tencent cloud

Tencent Cloud Observability Platform

Runtime Metadata

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-03-10 22:14:20
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.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan