1"use strict";(globalThis.webpackChunkwebsite=globalThis.webpackChunkwebsite||[]).push([[1709],{9089(e,a,r){r.r(a),r.d(a,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>t,toc:()=>l});var t=r(319),n=r(4848),o=r(8453);const s={title:"Automated performance testing for GraphQL Java",authors:"andi",slug:"performance"},i=void 0,c={authorsImageUrls:[void 0]},l=[];function h(e){const a={a:"a",br:"br",code:"code",p:"p",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a.p,{children:"GraphQL Java has become a mature and widely adopted library over the past 9.5 years.\nAnd while we continue to maintain, improve and add features, we don't expect revolutionary changes to the core of the library."}),"\n",(0,n.jsx)(a.p,{children:"As side effect of this maturity it became clear over the least years, that performance is a key aspect that users are interested in.\nEspecially in larger scale applications performance can have a huge impact on operational costs and user experience."}),"\n",(0,n.jsxs)(a.p,{children:["In GraphQL Java we leverage ",(0,n.jsx)(a.a,{href:"https://github.com/openjdk/jmh",children:"JMH aka Java Microbenchmark Harness"})," to measure and compare different performance aspects."]}),"\n",(0,n.jsx)(a.p,{children:"Historically, performance testing was done manually by running JMH benchmarks on a local machine."}),"\n",(0,n.jsx)(a.p,{children:"This comes with the obvious flaw that it's not reproducible over time and across different machines. A benchmark run on one developer's machine is not\ncomparable to a run on another developer's machine (or often even the same machine months later)."}),"\n",(0,n.jsx)(a.p,{children:"We are very happy to share that we have now an automated performance testing setup in place to overcome these limitations by running\nthe benchmarks in an isolated cloud environment."}),"\n",(0,n.jsxs)(a.p,{children:["Currently, it runs on every commit to the ",(0,n.jsx)(a.code,{children:"master"})," branch and the results are stored in the",(0,n.jsx)(a.br,{}),"\n",(0,n.jsx)(a.a,{href:"https://github.com/graphql-java/graphql-java/tree/master/performance-results",children:"performance results folder"}),".\nYou can visualize and compare results with the ",(0,n.jsx)(a.a,{href:"https://jmh.morethan.io/",children:"JMH Visualizer tool"}),", a free tool which runs in the browser.\nOur goal is to provide clear and reproducible performance improvements over time while preventing any regressions."]}),"\n",(0,n.jsxs)(a.p,{children:["This work is sponsored and made possible by ",(0,n.jsx)(a.a,{href:"https://www.atlassian.com/",children:"Atlassian"})," and we are very grateful for their support."]})]})}function p(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,n.jsx)(a,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},8453(e,a,r){r.d(a,{R:()=>s,x:()=>i});var t=r(6540);const n={},o=t.createContext(n);function s(e){const a=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(a):{...a,...e}},[a,e])}function i(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),t.createElement(o.Provider,{value:a},e.children)}},319(e){e.exports=JSON.parse('{"permalink":"/blog/performance","editUrl":"https://github.com/graphql-java/graphql-java-page/edit/master/blog/blog/2024-12-06-performance-testing.md","source":"@site/blog/2024-12-06-performance-testing.md","title":"Automated performance testing for GraphQL Java","description":"GraphQL Java has become a mature and widely adopted library over the past 9.5 years.","date":"2024-12-06T00:00:00.000Z","tags":[],"readingTime":1.35,"hasTruncateMarker":false,"authors":[{"name":"Andreas Marek","title":"Maintainer of GraphQL Java","url":"https://github.com/andimarek","imageURL":"https://github.com/andimarek.png","key":"andi","page":null}],"frontMatter":{"title":"Automated performance testing for GraphQL Java","authors":"andi","slug":"performance"},"unlisted":false,"prevItem":{"title":"GraphQL Java is a CVE Numbering Authority","permalink":"/blog/cna"},"nextItem":{"title":"Version 22 released","permalink":"/blog/v22-released"}}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.