compression thread should take measurements independently based on whether or not the create/write thread will actually bottleneck performance

dev
Paul Cruz 2017-07-24 15:14:58 -07:00
parent 0ee3f8c2f8
commit 4dc83ca64c
1 changed files with 6 additions and 3 deletions

View File

@ -412,14 +412,17 @@ static void* compressionThread(void* arg)
pthread_mutex_unlock(&ctx->jobWrite_mutex.pMutex);
if (willWaitForCreate || willWaitForWrite) {
DEBUG(2, "compression will wait for create or write on job %u\n", currJob);
if (willWaitForCreate) {
DEBUG(2, "compression will wait for create on job %u\n", currJob);
pthread_mutex_lock(&ctx->createCompletion_mutex.pMutex);
ctx->compressWaitCreateCompletion = ctx->createCompletion;
DEBUG(2, "create completion %f\n", ctx->compressWaitCreateCompletion);
pthread_mutex_unlock(&ctx->createCompletion_mutex.pMutex);
}
if (willWaitForWrite) {
DEBUG(2, "compression will wait for write on job %u\n", currJob);
pthread_mutex_lock(&ctx->writeCompletion_mutex.pMutex);
ctx->compressWaitWriteCompletion = ctx->writeCompletion;
DEBUG(2, "write completion %f\n", ctx->compressWaitWriteCompletion);