From maoling199210191 at sina.com Tue Apr 2 02:31:52 2019 From: maoling199210191 at sina.com (Justin Ling Mao) Date: Tue, 02 Apr 2019 10:31:52 +0800 Subject: For help:simulate 100000 read requests and 10 concurrency clients Message-ID: <20190402023152.96BC416600E5@webmail.sinamail.sina.com.cn> 1. Hi, OpenJDK JMH Community,I am writing a benchmark tool for zookeeper with JMH,and I have some questions for asking. Could someone please give me some helps ?2. If I want to test the read perfermance(the getData() method) and what I want is?simulate 100000 read requests and 10 concurrency clients,What the parameters/options(mode,fork,threads,measurementIterations,measurementBatchSize) should I set? ----------------------------------------------------------------------------------------------------------------------------------------------------------------- at OutputTimeUnit(TimeUnit.MILLISECONDS)@State(Scope.Thread)//@BenchmarkMode(Mode.SingleShotTime)public class ZkJMHTest { statc ZooKeeper zk = null; @Setup(Level.Iteration) public void setup() { try { zk = new ZooKeeper("127.0.0.1:2181", 60000, null); } catch (IOException e) { e.printStackTrace(); } } @Benchmark public void getData() { try { zk.getData("/benchmark",false, null); System.out.println("fuck-zk-read"); } catch (KeeperException | InterruptedException e) { e.printStackTrace(); } } public static void main(String[] args) throws RunnerException { Options options = new OptionsBuilder() .include(ZkJMHTest.class.getName()+".getData") .mode(Mode.SingleShotTime) //.threads(10) .measurementIterations(5) .measurementBatchSize(10000) .forks(1) .build(); new Runner(options).run(); }} From qwwdfsad at gmail.com Thu Apr 4 15:01:23 2019 From: qwwdfsad at gmail.com (Vsevolod Tolstopyatov) Date: Thu, 4 Apr 2019 18:01:23 +0300 Subject: [Patch] Missing RFFieldInfo.toString Message-ID: Hi, RFFieldInfo.toString is not implemented and it leads to a bit cryptic error messages: "Field "source" is declared within the class not having @State annotation. This can result in unspecified behavior, and prohibited. [org.openjdk.jmh.generators.reflection.RFFieldInfo at 30c79d23]" Fix is straightforward: Index: jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFFieldInfo.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFFieldInfo.java (revision 1463:5984e353dca775da0e2208ddaed8427cd9a43acd) +++ jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFFieldInfo.java (revision 1463+:5984e353dca7+) @@ -74,4 +74,9 @@ public boolean isFinal() { return Modifier.isFinal(f.getModifiers()); } + + @Override + public String toString() { + return declaringClass.getQualifiedName() + "." + f.getName(); + } } -- Best regards, Tolstopyatov Vsevolod From sergey.kuksenko at oracle.com Fri Apr 12 23:37:50 2019 From: sergey.kuksenko at oracle.com (Sergey Kuksenko) Date: Fri, 12 Apr 2019 16:37:50 -0700 Subject: RFR: 7902450: add option which allows to merge all regions from the same method in perfasm output Message-ID: <1895dd78-9781-e143-0d4b-c682e049c792@oracle.com> Hi, Please review patch: https://bugs.openjdk.java.net/browse/CODETOOLS-7902450 http://cr.openjdk.java.net/~skuksenko/jmh/7902450/webrev.00/ From eric.caspole at oracle.com Mon Apr 15 14:54:58 2019 From: eric.caspole at oracle.com (Eric Caspole) Date: Mon, 15 Apr 2019 10:54:58 -0400 Subject: RFR: 7902450: add option which allows to merge all regions from the same method in perfasm output In-Reply-To: <1895dd78-9781-e143-0d4b-c682e049c792@oracle.com> References: <1895dd78-9781-e143-0d4b-c682e049c792@oracle.com> Message-ID: <1c8e5d78-a46d-2eb2-880f-d403d8fefdcf@oracle.com> I'm not a JMH committer but I think this is a good idea, looks good. Eric On 4/12/19 19:37, Sergey Kuksenko wrote: > Hi, > > Please review patch: > > https://bugs.openjdk.java.net/browse/CODETOOLS-7902450 > > http://cr.openjdk.java.net/~skuksenko/jmh/7902450/webrev.00/ > > > From shade at redhat.com Thu Apr 18 09:45:56 2019 From: shade at redhat.com (shade at redhat.com) Date: Thu, 18 Apr 2019 09:45:56 +0000 Subject: hg: code-tools/jmh: 7902452: Missing RFFieldInfo.toString Message-ID: <201904180945.x3I9jv2x000692@aojmv0008.oracle.com> Changeset: 1c11c886e0c8 Author: shade Date: 2019-04-18 11:45 +0200 URL: http://hg.openjdk.java.net/code-tools/jmh/rev/1c11c886e0c8 7902452: Missing RFFieldInfo.toString Contributed-by: Vsevolod Tolstopyatov ! jmh-generator-reflection/src/main/java/org/openjdk/jmh/generators/reflection/RFFieldInfo.java From shade at redhat.com Thu Apr 18 09:47:05 2019 From: shade at redhat.com (Aleksey Shipilev) Date: Thu, 18 Apr 2019 11:47:05 +0200 Subject: [Patch] Missing RFFieldInfo.toString In-Reply-To: References: Message-ID: <8d2a9a53-54d9-a248-0dcf-a4d14feb7f18@redhat.com> On 4/4/19 5:01 PM, Vsevolod Tolstopyatov wrote: > Hi, RFFieldInfo.toString is not implemented and it leads to a bit cryptic > error messages: > > "Field "source" is declared within the class not having @State annotation. > This can result in unspecified behavior, and prohibited. > [org.openjdk.jmh.generators.reflection.RFFieldInfo at 30c79d23]" > > Fix is straightforward: Thank you, pushed: https://bugs.openjdk.java.net/browse/CODETOOLS-7902452 -Aleksey From maoling199210191 at sina.com Mon Apr 22 10:59:08 2019 From: maoling199210191 at sina.com (Justin Ling Mao) Date: Mon, 22 Apr 2019 18:59:08 +0800 Subject: hg: code-tools/jmh: 7902452: Missing RFFieldInfo.toString Message-ID: <20190422105908.C5AC119000E0@webmail.sinamail.sina.com.cn> 1. Hi, OpenJDK JMH Community,I am writing a benchmark tool for zookeeper with JMH,and I have some questions for asking.Could someone please give me some helps ?2. If I want to test the read perfermance(the getData() method) and what I want is?simulate 100000 read requests and 10 concurrency clients,What the parameters/options(mode,fork,threads,measurementIterations,measurementBatchSize) should I set?--------------------------------------------------------------------------------------------------------------------------- at OutputTimeUnit(TimeUnit.MILLISECONDS)@State(Scope.Thread)//@BenchmarkMode(Mode.SingleShotTime)public class ZkJMHTest { statc ZooKeeper zk = null; @Setup(Level.Iteration) public void setup() { try { zk = new ZooKeeper("127.0.0.1:2181", 60000, null); } catch (IOException e) { e.printStackTrace(); } } @Benchmark public void getData() { try { zk.getData("/benchmark",false, null); } catch (KeeperException | InterruptedException e) { e.printStackTrace(); } } public static void main(String[] args) throws RunnerException { Options options = new OptionsBuilder() .include(ZkJMHTest.class.getName()+".getData") .mode(Mode.SingleShotTime) //.threads(10) .measurementIterations(5) .measurementBatchSize(10000) .forks(1) .build(); new Runner(options).run(); }}