From dev-return-69132-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Tue Apr 24 09:44:50 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 542A5180679 for ; Tue, 24 Apr 2018 09:44:50 +0200 (CEST) Received: (qmail 55956 invoked by uid 500); 24 Apr 2018 07:44:48 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 55935 invoked by uid 99); 24 Apr 2018 07:44:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2018 07:44:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CC694E184D; Tue, 24 Apr 2018 07:44:47 +0000 (UTC) From: nkalmar To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper pull request #501: ZOOKEEPER-3019 add metric for slow fsyncs count Content-Type: text/plain Message-Id: <20180424074447.CC694E184D@git1-us-west.apache.org> Date: Tue, 24 Apr 2018 07:44:47 +0000 (UTC) Github user nkalmar commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/501#discussion_r183632850 --- Diff: src/java/test/org/apache/zookeeper/test/FourLetterWordsTest.java --- @@ -167,6 +167,8 @@ public void testValidateStatOutput() throws Exception { line = in.readLine(); Assert.assertTrue(Pattern.matches("^Mode: .*$", line)); line = in.readLine(); + Assert.assertTrue(Pattern.matches("^Fsync threshold exceeded: \\d+$", line)); --- End diff -- Well, it can be achieved, but needs some extra functions in ServerStats: -toStringWithoutFsync() -fsyncToString() (names are not final :) ) Because StatCommand first calls serverStats.toString(), and in serverStats, new Fsync command is already at the end. But in the commandRun() in StatCommand, the Node count is appended after the whole serverStats.toString() call. Is this OK with you @phunt ? ---