From 871402f68d3a87e5d7c0dafb1c994f6fd58e20d2 Mon Sep 17 00:00:00 2001 From: Xiaoge Su Date: Wed, 29 Jul 2020 14:09:32 -0700 Subject: [PATCH] Add File field in TestFailure event for cycleCheck and incrementCheck In workloads, cycleCheck and incrementCheck, both might trigger a test failure with reason "Rate below desired rate", and the other text are the same. Adding a File field will help differentiate these two events. --- fdbserver/workloads/Cycle.actor.cpp | 5 ++++- fdbserver/workloads/Increment.actor.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fdbserver/workloads/Cycle.actor.cpp b/fdbserver/workloads/Cycle.actor.cpp index 3b7e7ead27..b3098865d4 100644 --- a/fdbserver/workloads/Cycle.actor.cpp +++ b/fdbserver/workloads/Cycle.actor.cpp @@ -207,7 +207,10 @@ struct CycleWorkload : TestWorkload { } ACTOR Future cycleCheck( Database cx, CycleWorkload* self, bool ok ) { if (self->transactions.getMetric().value() < self->testDuration * self->minExpectedTransactionsPerSecond) { - TraceEvent(SevWarnAlways, "TestFailure").detail("Reason", "Rate below desired rate").detail("Details", format("%.2f", self->transactions.getMetric().value() / (self->transactionsPerSecond * self->testDuration))) + TraceEvent(SevWarnAlways, "TestFailure") + .detail("Reason", "Rate below desired rate") + .detail("File", __FILE__) + .detail("Details", format("%.2f", self->transactions.getMetric().value() / (self->transactionsPerSecond * self->testDuration))) .detail("TransactionsAchieved", self->transactions.getMetric().value()) .detail("MinTransactionsExpected", self->testDuration * self->minExpectedTransactionsPerSecond) .detail("TransactionGoal", self->transactionsPerSecond * self->testDuration); diff --git a/fdbserver/workloads/Increment.actor.cpp b/fdbserver/workloads/Increment.actor.cpp index bfe034b2cd..fd0484d8dc 100644 --- a/fdbserver/workloads/Increment.actor.cpp +++ b/fdbserver/workloads/Increment.actor.cpp @@ -135,7 +135,10 @@ struct Increment : TestWorkload { } ACTOR Future incrementCheck( Database cx, Increment* self, bool ok ) { if (self->transactions.getMetric().value() < self->testDuration * self->minExpectedTransactionsPerSecond) { - TraceEvent(SevWarnAlways, "TestFailure").detail("Reason", "Rate below desired rate").detail("Details", format("%.2f", self->transactions.getMetric().value() / (self->transactionsPerSecond * self->testDuration))) + TraceEvent(SevWarnAlways, "TestFailure") + .detail("Reason", "Rate below desired rate") + .detail("File", __FILE__) + .detail("Details", format("%.2f", self->transactions.getMetric().value() / (self->transactionsPerSecond * self->testDuration))) .detail("TransactionsAchieved", self->transactions.getMetric().value()) .detail("MinTransactionsExpected", self->testDuration * self->minExpectedTransactionsPerSecond) .detail("TransactionGoal", self->transactionsPerSecond * self->testDuration);