Ignore:
Timestamp:
Feb 27, 2013 11:34:13 PM (10 years ago)
Author:
gah
Message:

rework of stats log file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3376 r3377  
    747747 * ClientInfoCmd --
    748748 *
    749  *      Log initial values to stats file.
    750  *       
    751  *      clientinfo path list
     749 *      Log initial values to stats file.  The first time this is called
     750 *      "render_start" is written into the stats file.  Afterwards, it
     751 *      is "render_info".
     752 *     
     753 *         clientinfo list
    752754 */
    753755static int
     
    762764    static int first = 1;
    763765
    764     if (objc != 3) {
     766    if (objc != 2) {
    765767        Tcl_AppendResult(interp, "wrong # of arguments: should be \"",
    766                 Tcl_GetString(objv[0]), " path list\"", (char *)NULL);
     768                Tcl_GetString(objv[0]), " list\"", (char *)NULL);
    767769        return TCL_ERROR;
    768770    }
    769771#ifdef KEEPSTATS
    770     const char *path;
    771 
    772     path = Tcl_GetString(objv[1]);
    773     if (NanoVis::openStatsFile(path) < 0) {
     772    /* Use the initial client key value pairs as the parts for a generating
     773     * a unique file name. */
     774    f = NanoVis::getStatsFile(objv[1]);
     775    if (f < 0) {
    774776        Tcl_AppendResult(interp, "can't open stats file: ",
    775                 Tcl_PosixError(interp), (char *)NULL);
     777                         Tcl_PosixError(interp), (char *)NULL);
    776778        return TCL_ERROR;
    777779    }
     
    806808    Tcl_DStringAppendElement(&ds, buf);
    807809    /* Client arguments. */
    808     if (Tcl_ListObjGetElements(interp, objv[2], &numElems, &elems) != TCL_OK) {
     810    if (Tcl_ListObjGetElements(interp, objv[1], &numElems, &elems) != TCL_OK) {
    809811        return TCL_ERROR;
    810812    }
     
    815817
    816818#ifdef KEEPSTATS
    817     result = NanoVis::writeToStatsFile(Tcl_DStringValue(&ds),
     819    result = NanoVis::writeToStatsFile(f, Tcl_DStringValue(&ds),
    818820                                       Tcl_DStringLength(&ds));
    819821#else
Note: See TracChangeset for help on using the changeset viewer.