小编jit*_*ngh的帖子

寻找欧拉之旅

我正在尝试解决Udacity上的一个问题,描述如下:

# Find Eulerian Tour
#
# Write a function that takes in a graph
# represented as a list of tuples
# and return a list of nodes that
# you would follow on an Eulerian Tour
#
# For example, if the input graph was
# [(1, 2), (2, 3), (3, 1)]
# A possible Eulerian tour would be [1, 2, 3, 1]
Run Code Online (Sandbox Code Playgroud)

我提出了以下解决方案,虽然不像某些递归算法那样优雅,但似乎在我的测试用例中起作用.

def find_eulerian_tour(graph):
    tour = []

    start_vertex = graph[0][0]
    tour.append(start_vertex)

    while len(graph) > 0:
        current_vertex …
Run Code Online (Sandbox Code Playgroud)

python algorithm graph discrete-mathematics

7
推荐指数
1
解决办法
1万
查看次数

如何通过IIS日志查找服务器处理时间?

从IIS日志中,我发现一旦从客户端计算机获得正确提供请求的确认,它就会在日志中生成条目.因此,从IIS日志的属性开始,我们可以说它也有客户端等待时间.

Time Taken In IIS Logs = Server Processing Time + Client Wait Time to download the response
Run Code Online (Sandbox Code Playgroud)

这些是我们在IIS日志中获得的值:

  • 日期(日期)
  • 时间(时间)
  • 客户端IP地址(c-ip)
  • 用户名(cs-username)
  • 方法(cs方法)
  • URI词干(cs-uri-stem)
  • URI查询(cs-uri-query)
  • 协议状态(sc-status)
  • Win32状态(sc-win32-status)
  • 发送的字节数(sc-bytes)
  • 拍摄时间(拍摄时间)
  • 主机(cs-host)
  • 用户代理(cs(用户代理))
  • Referer(cs(Referer))

我的问题是 - 有没有办法找出IIS提供的每个Web请求的服务器处理时间?

iis performance logging iis-7 iis-7.5

6
推荐指数
1
解决办法
3105
查看次数