<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>undefined-type &#187; speed</title>
	<atom:link href="http://undefined-type.com/tag/speed/feed/" rel="self" type="application/rss+xml" />
	<link>http://undefined-type.com</link>
	<description>Flex,Flash &#38; AIR</description>
	<lastBuildDate>Wed, 18 Nov 2009 09:48:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bandwidth tester for server.</title>
		<link>http://undefined-type.com/2009/03/bandwidth-tester-for-server/</link>
		<comments>http://undefined-type.com/2009/03/bandwidth-tester-for-server/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 09:57:35 +0000</pubDate>
		<dc:creator>Bäcker</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[connection speed]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://undefined-type.com/?p=492</guid>
		<description><![CDATA[So I needed to try out some speed from a company server. You can always take a bandwidth test on your computer to see your own bandwidth speed (http://www.speedtest.net/), but when placing files on a server you also need to consider that server speed, the connection and the whole way of roadblocks to your computer.
First [...]]]></description>
			<content:encoded><![CDATA[<p>So I needed to try out some speed from a company server. You can always take a bandwidth test on your computer to see your own bandwidth speed (<a href="http://www.speedtest.net/" target="_blank">http://www.speedtest.net/</a>), but when placing files on a server you also need to consider that server speed, the connection and the whole way of roadblocks to your computer.</p>
<p><strong>First step</strong> is to create a dump file, I just took a ordinary file and renamed it to &#8220;data.bin&#8221;.</p>
<p><strong>Next step</strong> is the speed tester itself. If I figure it out correctly I can take the downloaded time and run it against the downloaded bits to get the speed.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> downloadTime:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">getTimer</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - timeMarker<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">1000</span>;
<span style="color: #000000; font-weight: bold;">var</span> bits:<span style="color: #0066CC;">Number</span> = file.<span style="color: #0066CC;">bytesTotal</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">8</span>;
<span style="color: #000000; font-weight: bold;">var</span> bps:<span style="color: #0066CC;">Number</span> = bits <span style="color: #66cc66;">/</span> downloadTime;</pre></div></div>

<p>Something like &#8220;bps = download size in bits / download secs&#8221;</p>
<p>To think of here is that when calculating file size 1mb = 1024kb, but when going for bits whe have 1kbps = 1000bps. Look at this (<a href="http://web.forret.com/tools/bandwidth.asp" target="_blank">http://web.forret.com/tools/bandwidth.asp</a>).</p>
<p><strong>How to use</strong><br />
So anyway I created this simple zip file, unzip it on your server, place a file/files in the same folder and then set the paths from the html file, look at <em>line 92</em>, <strong>&#8220;flashVars&#8221;</strong><span><strong>,</strong></span><span><strong> </strong></span><strong>&#8220;files=data.bin&#8221;</strong>, use , to add more files to load as an array.</p>
<p>This way I could for e.g. check that my connection is 9.6mbit to the net but the speed from my hosting server is 4.5mbit.</p>
<p>Download the Server Speed Tester. <a href="http://undefined-type.com/wp-content/uploads/2009/03/bandwidthtester.zip">bandwidthtester</a></p>
]]></content:encoded>
			<wfw:commentRss>http://undefined-type.com/2009/03/bandwidth-tester-for-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

