{"id":515,"date":"2012-05-09T00:04:17","date_gmt":"2012-05-09T04:04:17","guid":{"rendered":"http:\/\/www.rfdm.com\/blog\/?p=515"},"modified":"2013-04-20T10:59:14","modified_gmt":"2013-04-20T14:59:14","slug":"measuring-tcp-round-trip-times-part-5-first-round-of-clean-ups","status":"publish","type":"post","link":"https:\/\/www.rfdm.com\/blog\/?p=515","title":{"rendered":"Measuring TCP round-trip times, part 5: first round of clean-ups"},"content":{"rendered":"<p>I added the ability to toggle a chart&#8217;s y-axis scale between linear and logarithmic.  This has been deployed on the <a href=\"\/sitetraffic.php\">Site Traffic<\/a> page. <\/p>\n<p>Code cleanup&#8230; when I added the round-trip time plot, I wound up creating a lot of code that is largely a duplicate of code I had for the traffic plot.  Obviously there are differences in the data and the presentation, but much of it is similar or the same.  Tonight I started looking at trickling common functionality into base classes, functions and possibly a template or two.<\/p>\n<p>I started with the obvious: there&#8217;s little sense in having a lot of duplicate code for the basics of the charts.  While both instances were of type Wt::Chart::WCartesianChart, I had separate code to set things like the chart palette, handle a click on the chart widget, etc.  I&#8217;ve moved the common functionality into my own chart class.  It&#8217;s likely I&#8217;ll later use this class on my <a href=\"\/sitehealth.php\">Site Health<\/a> page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I added the ability to toggle a chart&#8217;s y-axis scale between linear and logarithmic. This has been deployed on the Site Traffic page. Code cleanup&#8230; when I added the round-trip time plot, I wound up creating a lot of code that is largely a duplicate of code I had for the traffic plot. Obviously there &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.rfdm.com\/blog\/?p=515\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Measuring TCP round-trip times, part 5: first round of clean-ups&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,12,13],"tags":[],"class_list":["post-515","post","type-post","status-publish","format-standard","hentry","category-freebsd","category-software-development","category-web-development"],"_links":{"self":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=515"}],"version-history":[{"count":3,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":624,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/515\/revisions\/624"}],"wp:attachment":[{"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rfdm.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}