admin管理员组

文章数量:1026343

I am using Django to serve an application, and I noticed some slowing down recently. So I went and checked the console that serves the server, that usually logs lines of this format : <date_time> "GET <path> HTTP/1.1" <HTTP_STATUS> <response_time>

What I thought was the response time in milliseconds is apparently not, as I get values that would be ludicrous (example 3923437 for a query that when timed in python directly takes 0.936 seconds). I'm pretty sure it's a response time though, as it's always scaled with the time I wait.

Can someone explain to me what that number is ? I couldn't find where this default log is documented.

I am using Django to serve an application, and I noticed some slowing down recently. So I went and checked the console that serves the server, that usually logs lines of this format : <date_time> "GET <path> HTTP/1.1" <HTTP_STATUS> <response_time>

What I thought was the response time in milliseconds is apparently not, as I get values that would be ludicrous (example 3923437 for a query that when timed in python directly takes 0.936 seconds). I'm pretty sure it's a response time though, as it's always scaled with the time I wait.

Can someone explain to me what that number is ? I couldn't find where this default log is documented.

Share Improve this question edited Nov 18, 2024 at 14:53 Equino asked Nov 18, 2024 at 10:09 EquinoEquino 816 bronze badges 2
  • i think the natural candidate would be content-length – folen gateis Commented Nov 18, 2024 at 10:35
  • Oh my, what a misunderstanding, I guess it "scaled" with the response time because it concerned more data and thus spent longer on the database query. – Equino Commented Nov 18, 2024 at 14:53
Add a comment  | 

1 Answer 1

Reset to default 3

It's the response size and it's printed by Python http-server which Django inherits. That explains why it's not documented by Django, because it's not the Django code that prints it.

You can verify that by looking at this Django module. This is the line that starts the http-server.

It inherits from Python http-server. This is the line that prints the response size.

I am using Django to serve an application, and I noticed some slowing down recently. So I went and checked the console that serves the server, that usually logs lines of this format : <date_time> "GET <path> HTTP/1.1" <HTTP_STATUS> <response_time>

What I thought was the response time in milliseconds is apparently not, as I get values that would be ludicrous (example 3923437 for a query that when timed in python directly takes 0.936 seconds). I'm pretty sure it's a response time though, as it's always scaled with the time I wait.

Can someone explain to me what that number is ? I couldn't find where this default log is documented.

I am using Django to serve an application, and I noticed some slowing down recently. So I went and checked the console that serves the server, that usually logs lines of this format : <date_time> "GET <path> HTTP/1.1" <HTTP_STATUS> <response_time>

What I thought was the response time in milliseconds is apparently not, as I get values that would be ludicrous (example 3923437 for a query that when timed in python directly takes 0.936 seconds). I'm pretty sure it's a response time though, as it's always scaled with the time I wait.

Can someone explain to me what that number is ? I couldn't find where this default log is documented.

Share Improve this question edited Nov 18, 2024 at 14:53 Equino asked Nov 18, 2024 at 10:09 EquinoEquino 816 bronze badges 2
  • i think the natural candidate would be content-length – folen gateis Commented Nov 18, 2024 at 10:35
  • Oh my, what a misunderstanding, I guess it "scaled" with the response time because it concerned more data and thus spent longer on the database query. – Equino Commented Nov 18, 2024 at 14:53
Add a comment  | 

1 Answer 1

Reset to default 3

It's the response size and it's printed by Python http-server which Django inherits. That explains why it's not documented by Django, because it's not the Django code that prints it.

You can verify that by looking at this Django module. This is the line that starts the http-server.

It inherits from Python http-server. This is the line that prints the response size.

本文标签: pythonWhat is the number at the end of the Django GET logStack Overflow