ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_stats.c
(Generate patch)

Comparing ircd-hybrid-8/modules/m_stats.c (file contents):
Revision 1294 by michael, Wed Feb 22 20:48:30 2012 UTC vs.
Revision 1302 by michael, Wed Mar 21 17:48:54 2012 UTC

# Line 81 | Line 81 | static void stats_class(struct Client *)
81   static void stats_memory(struct Client *);
82   static void stats_servlinks(struct Client *);
83   static void stats_ltrace(struct Client *, int, char **);
84 static void stats_ziplinks(struct Client *);
84  
85   /* This table contains the possible stats items, in order:
86   * /stats name,  function to call, operonly? adminonly? /stats letter
# Line 136 | Line 135 | static const struct StatsStruct
135    { 'y',        stats_class,            1,      0       },
136    { 'Y',        stats_class,            1,      0       },
137    { 'z',        stats_memory,           1,      0       },
139  { 'Z',        stats_ziplinks,         1,      0       },
138    { '?',        stats_servlinks,        0,      0       },
139    { '\0',       NULL,                   0,      0       }
140   };
# Line 1237 | Line 1235 | stats_memory(struct Client *source_p)
1235   }
1236  
1237   static void
1240 stats_ziplinks(struct Client *source_p)
1241 {
1242  dlink_node *ptr = NULL;
1243  unsigned int sent_data = 0;
1244
1245  DLINK_FOREACH(ptr, serv_list.head)
1246  {
1247    const struct Client *target_p = ptr->data;
1248
1249    if (IsCapable(target_p, CAP_ZIP))
1250    {
1251      /* we use memcpy(3) and a local copy of the structure to
1252       * work around a register use bug on GCC on the SPARC.
1253       * -jmallett, 04/27/2002
1254       */
1255      struct ZipStats zipstats;
1256
1257      memcpy(&zipstats, &target_p->localClient->zipstats, sizeof(zipstats));
1258
1259      sendto_one(source_p, ":%s %d %s Z :ZipLinks stats for %s send[%.2f%% "
1260                 "compression (%llu bytes data/%llu bytes wire)] recv[%.2f%% "
1261                 "compression (%llu bytes data/%llu bytes wire)]",
1262                 from, RPL_STATSDEBUG, to, target_p->name,
1263                 zipstats.out_ratio, zipstats.out, zipstats.out_wire,
1264                 zipstats.in_ratio,  zipstats.in,  zipstats.in_wire);
1265      ++sent_data;
1266    }
1267  }
1268
1269  sendto_one(source_p, ":%s %d %s Z :%u ziplink(s)",
1270             from, RPL_STATSDEBUG, to, sent_data);
1271 }
1272
1273 static void
1238   stats_servlinks(struct Client *source_p)
1239   {
1240    uint64_t sendB = 0, recvB = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines