You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Bharat Viswanadham (Jira)" <ji...@apache.org> on 2020/02/05 23:42:00 UTC

[jira] [Commented] (RATIS-810) Add metrics for SegmentedRaftLogWorker#WriteLog

    [ https://issues.apache.org/jira/browse/RATIS-810?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031132#comment-17031132 ] 

Bharat Viswanadham commented on RATIS-810:
------------------------------------------

There is an already metric available for the time taken by each task. Code snippet for that.

In this Jira added metric for wait time for stateMachine future for stateMachineFuture.
{code:java}
Timer.Context executionTimeContext =
 raftLogMetrics.getRaftLogTaskExecutionTimer(task.getClass().getSimpleName().toLowerCase()).time();
task.execute();
executionTimeContext.stop();{code}

> Add metrics for SegmentedRaftLogWorker#WriteLog
> -----------------------------------------------
>
>                 Key: RATIS-810
>                 URL: https://issues.apache.org/jira/browse/RATIS-810
>             Project: Ratis
>          Issue Type: Improvement
>          Components: server
>            Reporter: Lokesh Jain
>            Assignee: Bharat Viswanadham
>            Priority: Major
>
> WriteLog is an expensive operation and we should track its execution time in SegmentedRaftLogWorker. We should also track the time we wait on the stateMachineFuture.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)