有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅 查询。
量子设备操作通过率(过去 6 小时)
根据终端(成功或失败)记录,按过去 6 小时内成功的类型的操作百分比。
// Percentage of device operations that passed (Succeeded) over the last 6 hours.
// Only terminal records (Succeeded or Failed) are counted; Started records are excluded
// so each run is represented by its outcome exactly once.
QuantumProviderAccountDeviceOperationLogs
| where TimeGenerated > ago(6h)
| where ResultType in ("Succeeded", "Failed")
| summarize Total = count(), Passed = countif(ResultType == "Succeeded") by OperationName
| extend PassRatePercent = round(100.0 * Passed / Total, 2)
按设备列出的量子设备操作持续时间(过去 24 小时)
基于终端(成功或失败)记录,每个设备和操作类型在过去 24 小时内的平均操作持续时间(以毫秒为单位)。
// Average operation duration per device over the last 24 hours.
// Uses terminal records (Succeeded or Failed), which carry the wall-clock DurationMs;
// Started records report a duration of 0 and are excluded.
QuantumProviderAccountDeviceOperationLogs
| where TimeGenerated > ago(24h)
| where ResultType in ("Succeeded", "Failed")
| summarize AvgDurationMs = avg(DurationMs), RunCount = count() by DeviceName, DeviceId, OperationName
| sort by AvgDurationMs desc