more stats
This commit is contained in:
@@ -65,6 +65,7 @@ void dbCaReportLink(const struct link *plink, dbLinkReportInfo *pinfo)
|
||||
|
||||
pinfo->connected = ca_field_type(pca->chid) != TYPENOTCONN;
|
||||
pinfo->nWriteFail = pca->nNoWrite;
|
||||
pinfo->nDisconnect = pca->nDisconnect;
|
||||
|
||||
if (pinfo->connected) {
|
||||
pinfo->readable = ca_read_access(pca->chid);
|
||||
@@ -161,7 +162,7 @@ long dbcar(char *precordname, int level)
|
||||
linfo.detailLevel = level-2;
|
||||
dbReportLink(plink, &linfo);
|
||||
nconnected += linfo.connected;
|
||||
nDisconnect += !linfo.connected;
|
||||
nDisconnect += linfo.nDisconnect;
|
||||
noReadAccess += !linfo.readable;
|
||||
noWriteAccess += !linfo.writable;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@ typedef struct {
|
||||
unsigned readable:1; /* would a dbGetLink() succeed at this moment */
|
||||
unsigned writable:1; /* would a dbPutLink() succeed at this moment */
|
||||
/* callee fills in statistics */
|
||||
unsigned nDisconnect; /* number of times this link has entered a not connected state */
|
||||
unsigned nEvents; /* number of times new data has been received from the underlying data source */
|
||||
unsigned nWriteFail; /* number of times dbPutLink() has failed for this link */
|
||||
} dbLinkReportInfo;
|
||||
|
||||
Reference in New Issue
Block a user