tencent cloud

Performance Testing Service

Overview
Purchase Guide
Billing Overview
Pay-as-You-Go (postpaid)
Purchasing Channels
Payment Overdue
Refund Instructions
Quick Start
Operation Guide
Performance Testing in Simple Mode
Performance Testing in Script Mode
Performance Testing in JMeter Mode
Project Management
Scenario Management
Traffic Recording
Environment Management
Scheduled Performance Testing
Performance Testing Report
Access Control
Alarm Management
Tag Management
Error Code Manual
Practice Tutorial
Using Prometheus To Monitor Performance Testing Metrics
Using PTS to Playback Requests Recorded by GoReplay
API Documentation
History
Introduction
API Category
Making API Requests
PTS-related APIs
Data Types
Error Codes
JavaScript API List
Overview of JavaScript API List
pts/global
pts/http
pts
pts/dataset
pts/grpc
pts/jsonpath
pts/protobuf
pts/redis
pts/sql
pts/url
pts/util
pts/ws
pts/socketio
pts/socket
FAQs
Related Agreements
Service Level Agreement
Use Limits
Privacy Policy
Data Processing And Security Agreement

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