Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Jul 16, 2024
1 parent b4145be commit bbeff75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Lib9c/Action/HackAndSlash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public IWorld Execute(
var addressesHex = $"[{signer.ToHex()}, {AvatarAddress.ToHex()}]";
var started = DateTimeOffset.UtcNow;
const string source = "HackAndSlash";
using var activity = _activitySource.StartActivity("HackAndSlash");
var activity = _activitySource.StartActivity("HackAndSlash");
Log.Verbose("{AddressesHex} {Source} from #{BlockIndex} exec started",
addressesHex, source, blockIndex);

Expand Down Expand Up @@ -147,7 +147,7 @@ public IWorld Execute(

var sw = new Stopwatch();
sw.Start();
using var avatarStateActivity = _activitySource.StartActivity(
var avatarStateActivity = _activitySource.StartActivity(
"GetAvatarState",
ActivityKind.Internal,
activity?.Id ?? string.Empty);
Expand All @@ -163,7 +163,7 @@ public IWorld Execute(
addressesHex, source, "Get AvatarState", blockIndex, sw.Elapsed.TotalMilliseconds);

sw.Restart();
using var sheetActivity = _activitySource.StartActivity(
var sheetActivity = _activitySource.StartActivity(
"GetSheets",
ActivityKind.Internal,
activity?.Id ?? string.Empty);
Expand Down Expand Up @@ -609,12 +609,12 @@ public IWorld Execute(
);
stageCleared = true;

clearStageActivity?.Dispose();
sw.Stop();
Log.Verbose("{AddressesHex} {Source} HAS {Process} from #{BlockIndex}: {Elapsed}",
addressesHex, source, "ClearStage", blockIndex, sw.Elapsed.TotalMilliseconds);
}

clearStageActivity?.Dispose();
sw.Restart();

// This conditional logic is same as written in the
Expand Down

0 comments on commit bbeff75

Please sign in to comment.