84dba0006acf65324bb843abee1e11ad02c0a912 markd Sun Jul 5 20:01:10 2020 -0700 some cleanup about hgBlat diff --git src/gfServer/gfServer.c src/gfServer/gfServer.c index 9c2c43f..7c8a626 100644 --- src/gfServer/gfServer.c +++ src/gfServer/gfServer.c @@ -601,36 +601,36 @@ loctime = localtime (&curtime); /* Convert it to local time representation. */ strftime (timestr, sizeof(timestr), "%Y-%m-%d %H:%M", loctime); /* formate datetime as string */ logInfo("gfServer version %s on host %s, port %s (%s)", gfVersion, hostName, portName, timestr); struct hash *perSeqMaxHash = maybePerSeqMax(fileCount, seqFiles); time_t startIndexTime = clock1000(); if (indexFile == NULL) { char *desc = doTrans ? "translated" : "untranslated"; uglyf("starting %s server...\n", desc); logInfo("setting up %s index", desc); gfIdx = genoFindIndexBuild(fileCount, seqFiles, minMatch, maxGap, tileSize, repMatch, doTrans, NULL, allowOneMismatch, doMask, stepSize, noSimpRepMask); - logInfo("indexing building complete in %4.3f seconds", 0.001 * (clock1000() - startIndexTime)); + logInfo("index building completed in %4.3f seconds", 0.001 * (clock1000() - startIndexTime)); } else { gfIdx = genoFindIndexLoad(indexFile, doTrans); - logInfo("indexing loading complete in %4.3f seconds", 0.001 * (clock1000() - startIndexTime)); + logInfo("index loading completed in %4.3f seconds", 0.001 * (clock1000() - startIndexTime)); } /* Set up socket. Get ready to listen to it. */ socketHandle = netAcceptingSocket(port, 100); if (socketHandle < 0) errAbort("Fatal Error: Unable to open listening socket on port %d.", port); logInfo("Server ready for queries!"); printf("Server ready for queries!\n"); int connectFailCount = 0; for (;;) { ZeroVar(&fromAddr); fromLen = sizeof(fromAddr); connectionHandle = accept(socketHandle, (struct sockaddr*)&fromAddr, &fromLen); @@ -1166,41 +1166,46 @@ netSendString(STDOUT_FILENO, buf); netSendString(STDOUT_FILENO, "end"); } static void dynamicServer(char* rootDir) /* dynamic server for inetd. Read query from stdin, open index, query, respond, exit. * only one query at a time */ { // make sure error is logged pushWarnHandler(dynWarnErrorVa); char *command, *genomeName; int qSize; boolean isTrans; dynReadCommand(&command, &qSize, &isTrans, &genomeName); +logInfo("dynserver: %s %s %s size=%d ", command, genomeName, (isTrans ? "trans" : "untrans"), qSize); +time_t startTime = clock1000(); char seqFile[PATH_LEN]; char *seqFiles[1] = {seqFile}; // functions expect list of files char gfIdxFile[PATH_LEN]; dynGetDataFiles(rootDir, genomeName, isTrans, seqFiles[0], gfIdxFile); +logInfo("dynserver: index loading completed in %4.3f seconds", 0.001 * (clock1000() - startTime)); +startTime = clock1000(); struct genoFindIndex *gfIdx = genoFindIndexLoad(gfIdxFile, isTrans); if (endsWith(command, "Info")) dynamicServerInfo(command, genomeName, gfIdx); else dynamicServerQuery(command, qSize, genomeName, seqFiles, gfIdx); +logInfo("dynserver: %s completed in %4.3f seconds", command, 0.001 * (clock1000() - startTime)); } int main(int argc, char *argv[]) /* Process command line. */ { char *command; gfCatchPipes(); dnaUtilOpen(); optionInit(&argc, argv, optionSpecs); command = argv[1]; if (optionExists("trans")) { doTrans = TRUE; tileSize = 4;