Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ OnEventCommand()

override void System.Net.Http.HttpTelemetry.OnEventCommand ( EventCommandEventArgs command)
inlineprotectedvirtual

Reimplemented from System.Diagnostics.Tracing.EventSource.

Definition at line 363 of file HttpTelemetry.cs.

364 {
365 if (command.Command != EventCommand.Enable)
366 {
367 return;
368 }
369 if (_startedRequestsCounter == null)
370 {
371 _startedRequestsCounter = new PollingCounter("requests-started", this, () => Interlocked.Read(ref _startedRequests))
372 {
373 DisplayName = "Requests Started"
374 };
375 }
377 {
379 {
380 DisplayName = "Requests Started Rate",
381 DisplayRateTimeScale = TimeSpan.FromSeconds(1.0)
382 };
383 }
384 if (_failedRequestsCounter == null)
385 {
386 _failedRequestsCounter = new PollingCounter("requests-failed", this, () => Interlocked.Read(ref _failedRequests))
387 {
388 DisplayName = "Requests Failed"
389 };
390 }
392 {
394 {
395 DisplayName = "Requests Failed Rate",
396 DisplayRateTimeScale = TimeSpan.FromSeconds(1.0)
397 };
398 }
399 if (_currentRequestsCounter == null)
400 {
402 {
403 DisplayName = "Current Requests"
404 };
405 }
407 {
408 _totalHttp11ConnectionsCounter = new PollingCounter("http11-connections-current-total", this, () => Interlocked.Read(ref _openedHttp11Connections))
409 {
410 DisplayName = "Current Http 1.1 Connections"
411 };
412 }
414 {
415 _totalHttp20ConnectionsCounter = new PollingCounter("http20-connections-current-total", this, () => Interlocked.Read(ref _openedHttp20Connections))
416 {
417 DisplayName = "Current Http 2.0 Connections"
418 };
419 }
421 {
422 _http11RequestsQueueDurationCounter = new EventCounter("http11-requests-queue-duration", this)
423 {
424 DisplayName = "HTTP 1.1 Requests Queue Duration",
425 DisplayUnits = "ms"
426 };
427 }
429 {
430 _http20RequestsQueueDurationCounter = new EventCounter("http20-requests-queue-duration", this)
431 {
432 DisplayName = "HTTP 2.0 Requests Queue Duration",
433 DisplayUnits = "ms"
434 };
435 }
436 }
PollingCounter _totalHttp11ConnectionsCounter
IncrementingPollingCounter _startedRequestsPerSecondCounter
PollingCounter _startedRequestsCounter
PollingCounter _failedRequestsCounter
PollingCounter _totalHttp20ConnectionsCounter
IncrementingPollingCounter _failedRequestsPerSecondCounter
EventCounter _http20RequestsQueueDurationCounter
PollingCounter _currentRequestsCounter
EventCounter _http11RequestsQueueDurationCounter
static long Read(ref long location)

References System.Net.Http.HttpTelemetry._currentRequestsCounter, System.Net.Http.HttpTelemetry._failedRequests, System.Net.Http.HttpTelemetry._failedRequestsCounter, System.Net.Http.HttpTelemetry._failedRequestsPerSecondCounter, System.Net.Http.HttpTelemetry._http11RequestsQueueDurationCounter, System.Net.Http.HttpTelemetry._http20RequestsQueueDurationCounter, System.Net.Http.HttpTelemetry._openedHttp11Connections, System.Net.Http.HttpTelemetry._openedHttp20Connections, System.Net.Http.HttpTelemetry._startedRequests, System.Net.Http.HttpTelemetry._startedRequestsCounter, System.Net.Http.HttpTelemetry._startedRequestsPerSecondCounter, System.Net.Http.HttpTelemetry._stoppedRequests, System.Net.Http.HttpTelemetry._totalHttp11ConnectionsCounter, System.Net.Http.HttpTelemetry._totalHttp20ConnectionsCounter, System.Diagnostics.Tracing.EventCommandEventArgs.Command, System.TimeSpan.FromSeconds(), and System.Threading.Interlocked.Read().