<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Performance on Upsonar Blog</title><link>https://upsonar.io/blog/categories/performance/</link><description>Recent content in Performance on Upsonar Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 25 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://upsonar.io/blog/categories/performance/index.xml" rel="self" type="application/rss+xml"/><item><title>How We Measure HTTP Timing: DNS, TCP, TLS, TTFB Breakdown</title><link>https://upsonar.io/blog/how-we-measure-http-timing/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0000</pubDate><guid>https://upsonar.io/blog/how-we-measure-http-timing/</guid><description>&lt;p>When you check a website&amp;rsquo;s response time, &amp;ldquo;847ms&amp;rdquo; doesn&amp;rsquo;t tell you much. Is it slow DNS? Network latency? The server itself? You need a breakdown.&lt;/p>
&lt;p>At &lt;a href="https://upsonar.io/blog/">upsonar.io&lt;/a> we show exactly where the time goes. Here&amp;rsquo;s how we do it with Go&amp;rsquo;s &lt;code>net/http/httptrace&lt;/code> package.&lt;/p>
&lt;h2 id="the-problem">The problem&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="nx">start&lt;/span> &lt;span class="o">:=&lt;/span> &lt;span class="nx">time&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Now&lt;/span>&lt;span class="p">()&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nx">resp&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="nx">_&lt;/span> &lt;span class="o">:=&lt;/span> &lt;span class="nx">http&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Get&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;https://example.com&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="nx">fmt&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">time&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Since&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="nx">start&lt;/span>&lt;span class="p">))&lt;/span> &lt;span class="c1">// 847ms&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>847ms. But why? Could be anything.&lt;/p>
&lt;h2 id="the-solution">The solution&lt;/h2>
&lt;p>&lt;code>httptrace&lt;/code> hooks into every phase of an HTTP request. You attach callbacks, and they fire as each phase completes:&lt;/p></description></item></channel></rss>