网页API响应时间 [英] Web API response time

查看:297
本文介绍了网页API响应时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个服务器监控系统和要发送到Web API的请求,并获取服务器的健康JSON对象,如果它是好的,如果它的数据库连接工作,其响应时间等。

I'm building a server monitoring system and want to send a request to a Web API and get the server's health in a JSON object if it's ok, if its database connections are working, its response time, etc.

如何能实现的响应时间,称网页API需要多长时间来回答这个请求?

How can I implement the response time, saying how long the Web API takes to answer the request?

推荐答案

您可以启动一个的秒表您的客户端上并停止它时,你recive你awnser

You could start a Stopwatch on your client and stop it when you recive your awnser

这篇关于网页API响应时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆