source: geovis/trunk/Stats.h @ 5106

Last change on this file since 5106 was 4349, checked in by ldelgass, 10 years ago

Improvements to coordinate display, scale bar

File size: 1.0 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright (C) 2013-2014  HUBzero Foundation, LLC
4 *
5 * Author: Leif Delgass <ldelgass@purdue.edu>
6 */
7
8#ifndef GEOVIS_STATS_H
9#define GEOVIS_STATS_H
10
11#include <cstdlib>
12#include <sys/types.h>
13#include <sys/time.h>
14
15#ifndef STATSDIR
16#define STATSDIR        "/var/tmp/visservers"
17#endif
18
19namespace GeoVis {
20
21class Stats {
22public:
23    pid_t pid;
24    size_t nDataSets;       /**< # of data sets received */
25    size_t nDataBytes;      /**< # of bytes received as data sets */
26    size_t nFrames;         /**< # of frames sent to client. */
27    size_t nFrameBytes;     /**< # of bytes for all frames. */
28    size_t nCommands;       /**< # of commands executed */
29    double cmdTime;         /**< Elasped time spend executing commands. */
30    struct timeval start;   /**< Start of elapsed time. */
31};
32
33extern int serverStats(const Stats& stats, int code);
34
35extern int getStatsFile(const char *key);
36
37extern int writeToStatsFile(int fd, const char *s, size_t length);
38
39}
40
41#endif
Note: See TracBrowser for help on using the repository browser.