summaryrefslogtreecommitdiff
path: root/src/http_header_v1.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/http_header_v1.hpp')
-rw-r--r--src/http_header_v1.hpp62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/http_header_v1.hpp b/src/http_header_v1.hpp
new file mode 100644
index 0000000..6b4f5af
--- /dev/null
+++ b/src/http_header_v1.hpp
@@ -0,0 +1,62 @@
+#ifndef __HTTP_HEADER_V1__
+#define __HTTP_HEADER_V1__
+
+#include <sys/types.h>
+#include <MESA/field_stat2.h>
+#include <iostream>
+#include <map>
+#include <string>
+#include <algorithm>
+#include <iostream>
+
+using namespace std;
+
+typedef struct _http_header_info
+{
+ int header_id;
+ long long header_num;
+}http_header_t;
+
+class BaseFS
+{
+public:
+ screen_stat_handle_t fsstat_handle;
+public:
+ BaseFS(const char * header_name, const char *logdir);
+ ~BaseFS();
+
+ void start(void);
+ void passive_output(void);
+};
+
+class ContentTable : public BaseFS
+{
+private:
+ map<string, http_header_t> dynamic_line_id;
+ int total_status_id;
+ int no_header_id;
+ int num_column_id;
+ int ratio_column_id;
+ long long header_total;
+ long long no_header_num;
+ pthread_mutex_t mutex_lock;
+public:
+ ContentTable(const char * header_name, const char *logdir);
+ ~ContentTable();
+ int operate(enum field_op op, string line_name, long long value);
+ void operate_ratio();
+ long long set_nocontent_num();
+ long long get_head_total();
+};
+
+class ContentHistogram : public BaseFS
+{
+private:
+ int histogram_id;
+ pthread_mutex_t mutex_lock;
+public:
+ ContentHistogram(const char * header_name, const char *logdir);
+ ~ContentHistogram();
+ int content_lenght_operate(long long value);
+};
+#endif