trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1068752 - /trafficserver/traffic/trunk/proxy/logstats.cc
Date Wed, 09 Feb 2011 04:06:30 GMT
Author: zwoop
Date: Wed Feb  9 04:06:30 2011
New Revision: 1068752

URL: http://svn.apache.org/viewvc?rev=1068752&view=rev
Log:
TS-668 Disable sort() on Solaris, for now ... *sigh*

Modified:
    trafficserver/traffic/trunk/proxy/logstats.cc

Modified: trafficserver/traffic/trunk/proxy/logstats.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/logstats.cc?rev=1068752&r1=1068751&r2=1068752&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/logstats.cc (original)
+++ trafficserver/traffic/trunk/proxy/logstats.cc Wed Feb  9 04:06:30 2011
@@ -382,10 +382,15 @@ public:
   void
   dump(int as_object=0)
   {
-    int show = _show_urls ? _show_urls : _stack.size();
+    int show = _stack.size();
 
+    if (_show_urls > 0 && _show_urls < show)
+      show = _show_urls;
+
+#if !defined(__SUNPRO_CC)
     _stack.sort();
-    for (LruStack::iterator u=_stack.begin(); NULL != u->url && show-- >= 0;
++u)
+#endif
+    for (LruStack::iterator u=_stack.begin(); NULL != u->url && --show >= 0;
++u)
       _dump_url(u, as_object);
     if (as_object)
       std::cout << "  \"_timestamp\" : \"" << static_cast<int>(ink_time_wall_seconds())
<< "\"" << std::endl;
@@ -464,7 +469,7 @@ public:
         if (l->url)
           xfree(const_cast<char*>(l->url)); // We no longer own this string.
       } else {
-        l = _stack.insert(l, UrlStats());
+        l = _stack.insert(l, UrlStats()); // This seems faster than having a static "template"
...
       }
 
       // Setup this URL stat



Mime
View raw message