From: Aleš Křenek Date: Fri, 10 Dec 2004 11:58:15 +0000 (+0000) Subject: added CE statistics counting X-Git-Tag: glite-lb-client-interface_R_1_0_0~9 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=f085b8d28f1bb0c249a16e84c820f3387abd7953;p=jra1mw.git added CE statistics counting --- diff --git a/org.glite.lb.client-interface/Makefile b/org.glite.lb.client-interface/Makefile index bc7588d..39d467d 100644 --- a/org.glite.lb.client-interface/Makefile +++ b/org.glite.lb.client-interface/Makefile @@ -20,7 +20,7 @@ AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3 STAGETO=include/${globalprefix}/${lbprefix} STATIC_H=consumer.h context.h dump.h load.h notification.h notifid.h purge.h \ Notification.h CountRef.h Job.h LoggingExceptions.h ServerConnection.h \ - consumer_fake.h producer_fake.h + consumer_fake.h producer_fake.h statistics.h GEN_H=events.h jobstat.h producer.h Event.h JobStatus.h interface_version.h diff --git a/org.glite.lb.client-interface/interface/statistics.h b/org.glite.lb.client-interface/interface/statistics.h new file mode 100644 index 0000000..ce666a7 --- /dev/null +++ b/org.glite.lb.client-interface/interface/statistics.h @@ -0,0 +1,57 @@ +#ifndef __EDG_WORKLOAD_LOGGING_CLIENT_STATISTICS_H__ +#define __EDG_WORKLOAD_LOGGING_CLIENT_STATISTICS_H__ + +#include "edg/workload/logging/client/consumer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Count the number of jobs which entered the specified state. + * \param group IN: group of jobs of interest, eg. DESTINATION = something + * (XXX: this is the only query supported right now) + * \param major IN: major code of the state of interest + * \param minor IN: minor state code, eg. DONE_FAILED + * \param from,to INOUT: on input - requested interval of interest + * on output - when the data were available + * \param rate OUT: average rate per second in which the jobs enter this state + * \param res_from, res_to: time resolution of the data (seconds) + */ + +int edg_wll_StateRate( + edg_wll_Context context, + const edg_wll_QueryRec *group, + edg_wll_JobStatCode major, + int minor, + time_t *from, + time_t *to, + float *rate, + int *res_from, + int *res_to +); + + +/** Compute average time for which jobs stay in the specified state. + * \see edg_wll_StateRate for description of parameters. + */ + +int edg_wll_StateDuration( + edg_wll_Context context, + const edg_wll_QueryRec *group, + edg_wll_JobStatCode major, + int minor, + time_t *from, + time_t *to, + float *duration, + int *res_from, + int *res_to +); + + + +#ifdef __cplusplus +} +#endif + +#endif /* __EDG_WORKLOAD_LOGGING_CLIENT_CONSUMER_H__ */ +