Cool, but not necessarily accurate. The script will have completely different effects based on many factors. Just to name a few:
- Your internet connection: If you're on a slow modem, you're only really going to measure the slowness of your modem, not the response time of the server.
- Nodelets: My results are going to vary from yours, as will anyone who has a different nodelet setup. Some nodelets take longer to prepare than others, so someone with nodelets turned off will see a faster load than someone with every nodelet turned on. In this case, the code would be measuring the time it takes to get everything together, rather than the speed of the site.
- As for the 'log number of users' part, this won't provide any hardcore statistics either, as the level and intensity of user activity depends on just that: what users are doing. For example, say you have 3 entries where 40 users were logged in. The first entry, it was simply 40 people browsing the site content, no chatterbox clients running. The second entry with 40 users logged hit at a time when 25 of those users weren't really 'users' on the site: just bots hitting the xml tickers and grabbing nodes. The third time an entry of 40 users is marked, 10 users were attempting to load newest nodes, 23 were hitting xml tickers, and 18 were browsing the site. Ouch. And then, say you have an entry where there were only 7 users logged in, but it took *forever* to get the server's response. Why? Because you nailed the site at just the right time: a database backup is being done, and the site responsiveness slows down mega-time. Your code has no idea that a backup is in progress, so it logs an event of '7 users logged in, 59 seconds to load the page'.
- So, while it's a cool idea, there are just too many factors that come into play. Mainly time. At one particular second, 12 hits to the server might be made, while 1 second later, only 1 request was served. It's really just too unpredictable :)
++ for the effort however :)
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, reply to this node or /msg me to tell me what is wrong with the post, so that I may update the node to the best of my ability. If you do not inform me as to why the post deserved a downvote, your vote does not have any significance and will be disregarded.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.