You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@rya.apache.org by kchilton2 <gi...@git.apache.org> on 2016/08/18 02:31:27 UTC

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

GitHub user kchilton2 opened a pull request:

    https://github.com/apache/incubator-rya/pull/68

    [WIP] RYA-151 Rya Query benchmark tool implemented using JMH.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kchilton2/incubator-rya RYA-151

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-rya/pull/68.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #68
    
----
commit 3c770c87dd3535a156c15d288233fef328b19c57
Author: Kevin Chilton <ke...@parsons.com>
Date:   2016-08-18T02:29:41Z

    RYA-151 Rya Query benchmark tool implemented using JMH.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/68#discussion_r75354404
  
    --- Diff: extras/rya.benchmark/src/test/java/org/apache/rya/benchmark/query/BenchmarkQueriesReaderIT.java ---
    @@ -0,0 +1,55 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.rya.benchmark.query;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.InputStream;
    +
    +import javax.xml.bind.JAXBException;
    +
    +import org.apache.rya.benchmark.query.QueryBenchmark.BenchmarkQueriesReader;
    +import org.junit.Test;
    +import org.xml.sax.SAXException;
    +
    +import com.google.common.base.Charsets;
    +
    +/**
    + * Tests the methods of {@link BenchmarkQueriesReader}.
    + */
    +public class BenchmarkQueriesReaderIT {
    +
    +    @Test
    +    public void load() throws JAXBException, SAXException {
    +        // Unmarshal some XML.
    +        final String xml =
    +                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    +                "<BenchmarkQueries>\n" +
    +                "    <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>" +
    --- End diff --
    
    What do you want to do with those attributes? If they aren't used within the benchmark, that sort of information could easily just be XML comments.
    
    {code}
    <BenchmarkQueries>
        <!-- Name: ice cream query-->
        <!-- Description: This benchmarks the ice cream index. -->
       <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>
    <BenchmarkQueries>
    {code}


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/68#discussion_r75374018
  
    --- Diff: extras/rya.benchmark/src/test/java/org/apache/rya/benchmark/query/BenchmarkQueriesReaderIT.java ---
    @@ -0,0 +1,55 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.rya.benchmark.query;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.InputStream;
    +
    +import javax.xml.bind.JAXBException;
    +
    +import org.apache.rya.benchmark.query.QueryBenchmark.BenchmarkQueriesReader;
    +import org.junit.Test;
    +import org.xml.sax.SAXException;
    +
    +import com.google.common.base.Charsets;
    +
    +/**
    + * Tests the methods of {@link BenchmarkQueriesReader}.
    + */
    +public class BenchmarkQueriesReaderIT {
    +
    +    @Test
    +    public void load() throws JAXBException, SAXException {
    +        // Unmarshal some XML.
    +        final String xml =
    +                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    +                "<BenchmarkQueries>\n" +
    +                "    <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>" +
    --- End diff --
    
    The data is reported by the JMH framework for every parameter you tweak. So it will say which query the results are for. You can use the benchmark tool's output to generate those reports.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/68#discussion_r75374195
  
    --- Diff: extras/rya.benchmark/src/test/java/org/apache/rya/benchmark/query/BenchmarkQueriesReaderIT.java ---
    @@ -0,0 +1,55 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.rya.benchmark.query;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.InputStream;
    +
    +import javax.xml.bind.JAXBException;
    +
    +import org.apache.rya.benchmark.query.QueryBenchmark.BenchmarkQueriesReader;
    +import org.junit.Test;
    +import org.xml.sax.SAXException;
    +
    +import com.google.common.base.Charsets;
    +
    +/**
    + * Tests the methods of {@link BenchmarkQueriesReader}.
    + */
    +public class BenchmarkQueriesReaderIT {
    +
    +    @Test
    +    public void load() throws JAXBException, SAXException {
    +        // Unmarshal some XML.
    +        final String xml =
    +                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    +                "<BenchmarkQueries>\n" +
    +                "    <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>" +
    --- End diff --
    
    So the two parameters that I was planning on having you configure are:
    1. What SPARQL query to execute.
    2. The number of results to read from the query.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by amihalik <gi...@git.apache.org>.
Github user amihalik commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/68#discussion_r75303476
  
    --- Diff: extras/rya.benchmark/src/test/java/org/apache/rya/benchmark/query/BenchmarkQueriesReaderIT.java ---
    @@ -0,0 +1,55 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.rya.benchmark.query;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.InputStream;
    +
    +import javax.xml.bind.JAXBException;
    +
    +import org.apache.rya.benchmark.query.QueryBenchmark.BenchmarkQueriesReader;
    +import org.junit.Test;
    +import org.xml.sax.SAXException;
    +
    +import com.google.common.base.Charsets;
    +
    +/**
    + * Tests the methods of {@link BenchmarkQueriesReader}.
    + */
    +public class BenchmarkQueriesReaderIT {
    +
    +    @Test
    +    public void load() throws JAXBException, SAXException {
    +        // Unmarshal some XML.
    +        final String xml =
    +                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    +                "<BenchmarkQueries>\n" +
    +                "    <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>" +
    --- End diff --
    
    Can we add attributes to this?  for instance
    
    ```xml
    <BenchmarkQueries>
       <SPARQL name="ice cream query" description="This benchmarks the ice cream index"><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>
    <BenchmarkQueries>
    
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya issue #68: [WIP] RYA-151 Rya Query benchmark tool implemented ...

Posted by amihalik <gi...@git.apache.org>.
Github user amihalik commented on the issue:

    https://github.com/apache/incubator-rya/pull/68
  
    Please change this to point to the apache master branch.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by amihalik <gi...@git.apache.org>.
Github user amihalik commented on a diff in the pull request:

    https://github.com/apache/incubator-rya/pull/68#discussion_r75355985
  
    --- Diff: extras/rya.benchmark/src/test/java/org/apache/rya/benchmark/query/BenchmarkQueriesReaderIT.java ---
    @@ -0,0 +1,55 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.rya.benchmark.query;
    +
    +import static org.junit.Assert.assertEquals;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.InputStream;
    +
    +import javax.xml.bind.JAXBException;
    +
    +import org.apache.rya.benchmark.query.QueryBenchmark.BenchmarkQueriesReader;
    +import org.junit.Test;
    +import org.xml.sax.SAXException;
    +
    +import com.google.common.base.Charsets;
    +
    +/**
    + * Tests the methods of {@link BenchmarkQueriesReader}.
    + */
    +public class BenchmarkQueriesReaderIT {
    +
    +    @Test
    +    public void load() throws JAXBException, SAXException {
    +        // Unmarshal some XML.
    +        final String xml =
    +                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    +                "<BenchmarkQueries>\n" +
    +                "    <SPARQL><![CDATA[SELECT ?a WHERE { ?a <http://likes> <urn:icecream> . }]]></SPARQL>" +
    --- End diff --
    
    We should have query level granularity for the benchmark (i.e. we should have timing results for each query in the benchmark), so that we can have pretty graphs like this:
    
    ![image](https://cloud.githubusercontent.com/assets/4710489/17784519/c838a508-654a-11e6-8d65-e4043177dc6a.png)
    
    
    Also, it would be nice if the benchmark printed out the name of the query for the results.  So we can have a table like this:
    
    ![image](https://cloud.githubusercontent.com/assets/4710489/17784596/14630158-654b-11e6-8dbb-23325619d3d7.png)
    
    (Note: I ripped off these graphics from Roshan's Paper)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-rya pull request #68: [WIP] RYA-151 Rya Query benchmark tool imple...

Posted by kchilton2 <gi...@git.apache.org>.
Github user kchilton2 closed the pull request at:

    https://github.com/apache/incubator-rya/pull/68


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---