# How to interpret the log file's "View:" and "DB:" numbers?

**URL:** <https://www.ruby-forum.com/t/how-to-interpret-the-log-files-view-and-db-numbers/180833>\
**Category:** Rails\
**Created:** [December 30, 2009, 1:44am UTC](https://www.ruby-forum.com/t/how-to-interpret-the-log-files-view-and-db-numbers/180833 "2009-12-30T01:44:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![robb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a183cd/32.png) [@robb](https://www.ruby-forum.com/u/robb)\
**Post date:** [December 30, 2009, 1:44am UTC](https://www.ruby-forum.com/t/how-to-interpret-the-log-files-view-and-db-numbers/180833/1 "2009-12-30T01:44:08Z")

</div>

I’m seeing weird numbers come up in my production log. I’ve looked  
for some kind of authoritative document describing what they mean, but  
haven’t found it yet. Here are my best guesses:

“Completed in 125ms (View: 40, DB: 6)”

6ms in “DB” … but what exactly counts as “DB”? Is this purely the  
time that Rails is waiting on the database to provide data?

40ms in “View” … rendering the template. (?)

125-(40+6) = 79ms in the Controller.

And here’s a weird one that I get frequently:

“Completed in 27ms (View: 20, DB: 893)”

No clue what this means. I’ve done testing on the server, using “time  
curl ”, and found that the “Completed in” value is accurate.

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![robb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a183cd/32.png) [@robb](https://www.ruby-forum.com/u/robb)\
**Post date:** [December 30, 2009, 2:36am UTC](https://www.ruby-forum.com/t/how-to-interpret-the-log-files-view-and-db-numbers/180833/2 "2009-12-30T02:36:14Z")

</div>

same here,i dont konw way. But i have a try search,this code can help  
we.

[http://ramblingsonrails.com/a-rails-log-parser-to-show-how-your-actions-are-performing](http://ramblingsonrails.com/a-rails-log-parser-to-show-how-your-actions-are-performing)

View usage information by running:  
ruby\_log\_parser.rb --help  
Example  
andrew:~$ ruby rails\_log\_parser.rb --sort median \< log/development.log  
±---------------------±------±-----------±-----±-----±-----±-------+  
| Uri | Calls | Total Time | Max | Min | Avg | Median |  
±---------------------±------±-----------±-----±-----±-----±-------+  
| TestController#index | 7 | 9316 | 1748 | 1053 | 1330 | 1221 |  
| TestController#show | 1 | 764 | 764 | 764 | 764 | 764 |  
±---------------------±------±-----------±-----±-----±-----±-------+

2009/12/30 Robb [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> –

–  
tommy xiao  
E-mail: xiaods(AT)[gmail.com](http://gmail.com)

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
