最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

python - What is the number at the end of the Django GET log? - Stack Overflow

matteradmin8PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far