Ignore:
Timestamp:
Nov 15, 2016, 3:05:24 PM (8 years ago)
Author:
ldelgass
Message:

merge r6642 from pymolproxy trunk (dataset stats)

Location:
pymolproxy/branches/1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pymolproxy/branches/1.0

  • pymolproxy/branches/1.0/pymolproxy.c

    r6635 r6643  
    8787#include <md5.h>
    8888
    89 #define PYMOLPROXY_VERSION "1.0.2"
     89#define PYMOLPROXY_VERSION "1.0.3"
    9090
    9191#undef INLINE
     
    137137typedef struct {
    138138    pid_t pid;                          /* Child process. */
     139    size_t numDataSets;                 /* # of pdb data sets received */
     140    size_t numDataBytes;                /* # of bytes received as pdb */
    139141    size_t numFrames;                   /* # of frames sent to client. */
    140142    size_t numBytes;                    /* # of bytes for all frames. */
     
    643645     *   - Stop date of session
    644646     *   - Stop date of session in seconds
     647     *   - Number of data sets loaded from client
     648     *   - Number of data bytes total loaded from client
    645649     *   - Number of frames returned
    646650     *   - Number of bytes total returned (in frames)
     
    678682    Tcl_DStringAppendElement(&ds, "date_secs");
    679683    sprintf(buf, "%ld", now.tv_sec);
     684    Tcl_DStringAppendElement(&ds, buf);
     685    /* num_data_sets */
     686    Tcl_DStringAppendElement(&ds, "num_data_sets");
     687    sprintf(buf, "%lu", (unsigned long)stats.numDataSets);
     688    Tcl_DStringAppendElement(&ds, buf);
     689    /* data_set_bytes */
     690    Tcl_DStringAppendElement(&ds, "data_set_bytes");
     691    sprintf(buf, "%lu", (unsigned long)stats.numDataBytes);
    680692    Tcl_DStringAppendElement(&ds, buf);
    681693    /* num_frames */
     
    11591171        p->status = TCL_OK;
    11601172    }
     1173    stats.numDataSets++;
     1174    stats.numDataBytes += numBytes;
    11611175 error:
    11621176    if (allocated != NULL) {
     
    24992513    DEBUG("Idle timeout: %ld", idleTimeout);
    25002514
     2515    memset(&stats, 0, sizeof(stats));
    25012516    InitProxy(&proxy, argv + optind);
    25022517    if (pthread_create(&thread1, NULL, &ClientToServer, &proxy) < 0) {
Note: See TracChangeset for help on using the changeset viewer.