• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

問題を作成する

平均応答時間の例(v2)

ここでは、New Relic API Explorer (v2) を使用して、指定した期間におけるアプリケーションの平均応答時間を取得する例を紹介します。

平均応答時間

平均レスポンスタイム(ミリ秒)は、 APM Summary page のアプリのメインチャートに表示される値です。New Relic では、この式を使ってレスポンスタイムを計算しています。

Response time = HttpDispatcher:average_call_time + ((WebFrontend/Queue:call_count * WebFrontend/Queue:average_response_time) / HttpDispatcher:call_count)

メトリック値を取得するには、以下の2つのコマンドを使用します。

これらの例では、それぞれに同じ期間が使用されており、両方とも要約(平均)されています。

bash
$
curl -X GET "https://api.newrelic.com/v2/applications/${APP_ID}/metrics/data.xml" \
>
-H "X-Api-Key:${API_KEY}" -i \
>
-d 'names[]=HttpDispatcher&values[]=average_call_time&values[]=call_count&from=2014-03-01T20:59:00+00:00&to=2014-03-01T21:59:00+00:00&summarize=true'
bash
$
curl -X GET "https://api.newrelic.com/v2/applications/${APP_ID}/metrics/data.xml" \
>
-H "X-Api-Key:${API_KEY}" -i \
>
-d 'names[]=WebFrontend/QueueTime&values[]=call_count&values[]=average_response_time&from=2014-03-01T20:59:00+00:00&to=2014-03-01T21:59:00+00:00&summarize=true'

アプリケーションは、問題の期間のキュー時間がゼロである可能性があります。その場合、 WebFrontend/QueueTime指標の値はゼロになります。

ヒント

アプリがキューイング時間を報告したことがない場合、指標WebFrontend/QueueTimeは存在しません。

レスポンスタイム

APM の概要ページでは、応答時間はアプリのメイン チャート内に重ねて表示された線です。この行で示されるメトリック値を取得するには、上記と同じ式と 2 つのコマンドを使用しますが、コマンドからsummarize=trueを削除します。

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.