性能与运行可靠性
原能力
在冻结环境测量性能和可靠性,保留失败、超时及完整计量过程。(合同附件 R7 24.8)
首选项目
k6(AGPL-3.0)。 k6
匹配范围
压测与生产观察度量满足技术测量底座。
源码
k6 · func (ts *Thresholds) Run(
metrics/thresholds.go · 170–183 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
func (ts *Thresholds) Run(sink Sink, duration time.Duration) (bool, error) {
// Initialize the sinks store
ts.sinked = make(map[string]float64)
// FIXME: Remove this comment as soon as the metrics.Sink does not expose Format anymore.
//
// As of December 2021, this block reproduces the behavior of the
// metrics.Sink.Format behavior. As we intend to try to get away from it,
// we instead implement the behavior directly here.
//
// For more details, see https://github.com/grafana/k6/issues/2320
switch sinkImpl := sink.(type) {
case *CounterSink:
ts.sinked["count"] = sinkImpl.Value
OpenTelemetry Python · def start_span(
opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py · 1219–1232 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
def start_span( # pylint: disable=too-many-locals
self,
name: str,
context: context_api.Context | None = None,
kind: trace_api.SpanKind = trace_api.SpanKind.INTERNAL,
attributes: types.Attributes = None,
links: Sequence[trace_api.Link] | None = (),
start_time: int | None = None,
record_exception: bool = True,
set_status_on_exception: bool = True,
) -> trace_api.Span:
links = links or ()
parent_span_context = trace_api.get_current_span(context).get_span_context()
- # Copyright The OpenTelemetry Authors
- # SPDX-License-Identifier: Apache-2.0
实现与验收要点
原响应要求、资源约束、故障恢复场景和独立验收。