Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Feature] Add sampleType to SampleResult

Đang mở
#6,762 3 bình luận 2 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Trước tiên, hãy đọc API của SampleResult và điểm vào TransactionController.isFromTransactionController, sau đó lần theo cách các listener, backend listener, plugin và các consumer khác xác định các loại kết quả. Hoàn tất khi SampleResult cung cấp một loại SAMPLE hoặc TRANSACTION tường minh vẫn đáng tin cậy khi responseMessage của một Transaction Controller được tùy chỉnh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement to-triage
Use case

There is currently no explicit/documented field in SampleResult that identifies the type of result, such as SAMPLE or TRANSACTION.

The current workaround is to use:

TransactionController.isFromTransactionController(sampleResult)

However, this approach is fragile because transaction detection depends on other SampleResult fields. In particular, it can break when a user redefines the responseMessage of the Transaction Controller with a custom value.

This behavior is also not documented, so users have no way to know that redefining the Transaction Controller's responseMessage can silently break transaction detection.

Possible solution

Add an explicit sampleType field to SampleResult, for example:

public enum SampleType {
    SAMPLE,
    TRANSACTION
}

Then consumers could use:

sampleResult.getSampleType() == SampleType.TRANSACTION

This would provide a reliable way for listeners, backend listeners, plugins, and other consumers to identify the type of a SampleResult.

Possible workarounds

No response

JMeter Version

5.6.3

Java Version

java 17.0.7

OS Version

No response

Ngôn ngữ chính
Java
Star
9.6k
Fork
2.3k
Merge trung bình
18 giờ 33 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/jmeter

Tất cả issue của apache/jmeter

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.