Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqd1W-0002bi-VU for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 12:06:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gqd1V-0004Dt-MN for pgadmin-hackers@arkaria.postgresql.org; Mon, 04 Feb 2019 12:06:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqd1V-0004Dm-5b for pgadmin-hackers@lists.postgresql.org; Mon, 04 Feb 2019 12:06:49 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gqd1R-0005M2-84 for pgadmin-hackers@postgresql.org; Mon, 04 Feb 2019 12:06:47 +0000 Received: by mail-lj1-x242.google.com with SMTP id t9-v6so11328379ljh.6 for ; Mon, 04 Feb 2019 04:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nuRfwsmp4DRpczu8EWQAKfa1vp6KDeqbHAf+PE8Y1Ok=; b=1SpamjXJU/4ESA++3gDrz+oN5IRUIUBbBzyWmAFv50kSmvbTyS17pnONXcmBbVFBmh 9KXueysvn/36YUgMtepgy8mfE/Pm5p8idKm+PdfreI+aQnIVPGlN546eiJmDpTb8V1vR C91sV1jNGB+rtkoV3C3e550fUjlNuVX8/ewHI13oBJio8/VNk+YN77pFo28KIQqoBsPZ 8g+/LC98pqdcfdh4efwr0gk1oq+RI67o5DFaCvlROySCD/Bqp7cXzNAEP7pl7D4uaRa6 GqgqfX+/AOT/p+dZV9eQDJEwfW14GbejIchQDsTEKheI7uJJeAzniR/qH+V3i0YdJQB7 wYug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nuRfwsmp4DRpczu8EWQAKfa1vp6KDeqbHAf+PE8Y1Ok=; b=kBitUHzHLwwPq62JbfQjcitUQWBLjh8i0fUXBxb51ZOs5JL/iBn49y/5ZIlRvBdceT Leg65riXEhh5ZgTTFg1CYgGPiwArr7AW/Vx7WdrNtTv/Z/cLQwCmnowpbEPUv5ThWs1e mYSFVSUuOjZ1xTBs8dYv0tFIaumMOMuE5LOmJVQoceYdaeox1SSKtU0IjyU+2I09xR/3 z7STSVIwRikz6INX5ZykVhd/mCq+LCW5SZO9URDMQCWu9WOom1ng2CLB7vH3Xs5tNDQs bBmrDhrl1H9cgnvz+EZR48N4v8zngkH37f7/YLrUWqZ70L6wWvRY9zkdWymUijtgQBV7 SfCg== X-Gm-Message-State: AJcUukfN7u5xwxhQutqjSY6oAZwCCtW39lusAtmMFHLaqp2DdSyXEdvJ JPEnp2zrUoA5pd8QpM8ROhrfUPdkrThYIasmdgrtMQ== X-Google-Smtp-Source: ALg8bN4Tz8Yv22s3fXfH1CNOtORB9mMF+MlVcHzv/z+njd7o7PhG+K2NO9pOOxIc3NKw0ceBaUnBB3hl9vkpn/4r5mQ= X-Received: by 2002:a2e:81d3:: with SMTP id s19-v6mr36151437ljg.138.1549282003087; Mon, 04 Feb 2019 04:06:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Mon, 4 Feb 2019 17:36:31 +0530 Message-ID: Subject: Re: [pgAdmin4][RM3941] Dashboard graphs needs optimizations To: Akshay Joshi Cc: Dave Page , Khushboo Vashi , pgadmin-hackers Content-Type: multipart/mixed; boundary="00000000000073b3e0058110532e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000073b3e0058110532e Content-Type: multipart/alternative; boundary="00000000000073b3de058110532c" --00000000000073b3de058110532c Content-Type: text/plain; charset="UTF-8" Hi Hackers, Attached is the patch to fix jasmine test cases. Didn't realise the timezones could create issues :( Kindly review. On Mon, Feb 4, 2019 at 4:17 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the patch to change the dashboard test cases to fetch > server_id similar to how it is done in other test cases. > > Kindly review. > > On Mon, Feb 4, 2019 at 3:43 PM Akshay Joshi > wrote: > >> Thanks patch applied. >> >> On Mon, Feb 4, 2019 at 3:27 PM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Hackers, >>> >>> Attached is the updated patch. The poller will wait 3 times the normal >>> interval before sending new request if the previous request is pending. >>> After that, it will send the ajax. >>> >>> Kindly review. >>> >>> On Mon, Feb 4, 2019 at 3:12 PM Dave Page wrote: >>> >>>> I can't get to this right now, but Akshay, can we get it in before the >>>> release? >>>> >>>> I don't think the problem Khushboo notes is really a problem. Waiting >>>> for a response before issuing another one seems sensible... as long as >>>> there's a timeout so things don't get stuck if a response gets lost >>>> somehow. Maybe the timeout should be something like 3x the normal interval? >>>> >>>> On Mon, Feb 4, 2019 at 9:02 AM Khushboo Vashi < >>>> khushboo.vashi@enterprisedb.com> wrote: >>>> >>>>> Hi Aditya, >>>>> >>>>> I have reviewed the patch and it looks good to me except the logic to >>>>> wait until we get the response from the AJAX request. >>>>> So, in this case at a time only one request is being sent to the >>>>> server. >>>>> >>>>> @ Dave/Ashesh, if you think this is okay then we can commit the patch. >>>>> >>>>> Thanks, >>>>> Khushboo >>>>> >>>>> On Mon, Feb 4, 2019 at 10:45 AM Akshay Joshi < >>>>> akshay.joshi@enterprisedb.com> wrote: >>>>> >>>>>> Hi Khushboo >>>>>> >>>>>> Can you please review it. >>>>>> >>>>>> On Fri, Feb 1, 2019 at 7:04 PM Aditya Toshniwal < >>>>>> aditya.toshniwal@enterprisedb.com> wrote: >>>>>> >>>>>>> Hi Hackers, >>>>>>> >>>>>>> Attached is the patch to optimise the dashboard. Changes include: >>>>>>> 1) One ajax request for the all the charts instead of separate for >>>>>>> every chart. The next request will not hit until the previous is completed. >>>>>>> 2) The code will check for intervals which is greatest common >>>>>>> divisor of all the refresh rates. Chart names which will be eligible for >>>>>>> refresh will be sent with the ajax. If none are eligible, no ajax will be >>>>>>> fired. >>>>>>> 3) In the backend, query is generated in such a way that data for >>>>>>> all the requested chart names will be fetched in one hit to the database. >>>>>>> 4) Test cases for charts rest api and javascript added. >>>>>>> >>>>>>> -- >>>>>>> Thanks and Regards, >>>>>>> Aditya Toshniwal >>>>>>> Software Engineer | EnterpriseDB Software Solutions | Pune >>>>>>> "Don't Complain about Heat, Plant a tree" >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Akshay Joshi* >>>>>> >>>>>> *Sr. Software Architect * >>>>>> >>>>>> >>>>>> >>>>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >>>>>> >>>>> >>>> >>>> -- >>>> Dave Page >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>>> >>>> EnterpriseDB UK: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>> >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> Software Engineer | EnterpriseDB Software Solutions | Pune >>> "Don't Complain about Heat, Plant a tree" >>> >> >> >> -- >> *Akshay Joshi* >> >> *Sr. Software Architect * >> >> >> >> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246* >> > > > -- > Thanks and Regards, > Aditya Toshniwal > Software Engineer | EnterpriseDB Software Solutions | Pune > "Don't Complain about Heat, Plant a tree" > -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" --00000000000073b3de058110532c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

Attached is the patch to fix jasmine test case= s. Didn't realise the timezones could create issues :(
Kindly review.<= /div>

On Mon, Feb 4, 2019 at 4:17 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>= ; wrote:
Hi Hackers,

Attached is the patch to change the dashboard test ca= ses to fetch server_id similar to how it is done=C2=A0in other test cases.<= /div>
=
Kindly review.

On Mon, Feb 4, 2019 at 3:43 PM Akshay Joshi <akshay.jos= hi@enterprisedb.com> wrote:
Thanks patch applied.

On Mon, Feb 4, 201= 9 at 3:27 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wro= te:
= Hi Hackers,

Attached is the updated patch. The poller will wait 3 time= s the normal interval before sending new request if the previous request is= pending. After that, it will send the ajax.

Kindly review.

On Mo= n, Feb 4, 2019 at 3:12 PM Dave Page <dpage@pgadmin.org> wrote:
I can't get to th= is right now, but Akshay, can we get it in before the release?

I don't think the problem Khushboo notes is really a problem. Wa= iting for a response before issuing another one seems sensible... as long a= s there's a timeout so things don't get stuck if a response gets lo= st somehow. Maybe the timeout should be something like 3x the normal interv= al?

On Mon, Feb 4, 2019 at 9:02 AM Khushboo Vashi <khushboo.vashi@enterpr= isedb.com> wrote:
Hi Aditya,

I have reviewed t= he patch and it looks good to me except the logic to wait until we get the = response from the AJAX request.
So, in this case at a time only o= ne request is being sent to the server.

@ Dave/Ash= esh, if you think this is okay then we can commit the patch.

=
Thanks,
Khushboo

On Mon, Feb 4, 2019 at 10:45 AM = Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Khushboo

=
Can you please review it.

On Fri, Feb 1, 2019 at 7:04 PM Ad= itya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi Hackers,
Attached is the patch to optimise the dashboard. Changes include:
1) One = ajax request for the all the charts instead of separate for every chart. Th= e next request will not hit until the previous is completed.
2) The code wi= ll check for intervals which is greatest common divisor of all the refresh = rates. Chart names which will be eligible for refresh will be sent with the= ajax. If none are eligible, no ajax will be fired.
3) In the backend, quer= y is generated in such a way that data for all the requested chart names wi= ll be fetched in one hit to the database.
4) Test cases for charts rest api= and javascript added.

--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software S= olutions |=C2=A0Pune
<= span style=3D"font-family:"trebuchet ms",sans-serif;font-size:x-s= mall">"Don't Complain about Heat, Plant a = tree"


--
Akshay Josh= i
Sr. Software Architect


= Phone: +91 20-3058-9517
Mobile: +91 976-78= 8-8246


--
Dave Page
B= log: http://pgsna= ke.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com=
The Enterprise PostgreSQL Company


--
Thanks an= d Regards,
Aditya To= shniwal
Software Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
"Don't Complain about Heat, Plant a tree"


--
= Akshay Joshi
Sr. Software Architect

=

<= /font>
Phon= e: +91 20-3058-9517
Mobile: +91 976-788-8246


--
Thanks and Regards,
Aditya Toshniwal
Software Engineer |=C2=A0EnterpriseDB Software Sol= utions |=C2=A0Pune
"Don't Complain about Heat, Plant a tr= ee"


--
Thanks and Rega= rds,
Aditya Toshniwa= l
Softw= are Engineer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
&q= uot;Don't Complain about Heat, Plant a tree"
--00000000000073b3de058110532c-- --00000000000073b3e0058110532e Content-Type: application/octet-stream; name="RM3941.jasmine.patch" Content-Disposition: attachment; filename="RM3941.jasmine.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jrqah6it0 ZGlmZiAtLWdpdCBhL3dlYi9yZWdyZXNzaW9uL2phdmFzY3JpcHQvcGdhZG1pbl91dGlsc19zcGVj LmpzIGIvd2ViL3JlZ3Jlc3Npb24vamF2YXNjcmlwdC9wZ2FkbWluX3V0aWxzX3NwZWMuanMKaW5k ZXggMzQxMzc2YWQuLjM5ZmU4N2RmIDEwMDY0NAotLS0gYS93ZWIvcmVncmVzc2lvbi9qYXZhc2Ny aXB0L3BnYWRtaW5fdXRpbHNfc3BlYy5qcworKysgYi93ZWIvcmVncmVzc2lvbi9qYXZhc2NyaXB0 L3BnYWRtaW5fdXRpbHNfc3BlYy5qcwpAQCAtMTUsOCArMTUsOCBAQCBkZXNjcmliZSgnZ2V0RXBv Y2gnLCBmdW5jdGlvbiAoKSB7CiAgIH0pOwogCiAgIGl0KCdzaG91bGQgcmV0dXJuIGVwb2NoIGZv ciBhIGRhdGUgcGFzc2VkJywgZnVuY3Rpb24gKCkgewotICAgIGxldCBzb21lRGF0ZSA9IG5ldyBE YXRlKDIwMTksMSwxLDEwLDIwLDMwLDQwKSwKLSAgICAgIHNvbWVEYXRlRXBvY2ggPSAxNTQ4OTk2 NjMwOworICAgIGxldCBzb21lRGF0ZSA9IG5ldyBEYXRlKCdGZWIgMDEgMjAxOSAxMDoyMDozMCBH TVQwMDAwJyksCisgICAgICBzb21lRGF0ZUVwb2NoID0gMTU0OTAxNjQzMDsKIAogICAgIGV4cGVj dChnZXRFcG9jaChuZXcgRGF0ZShzb21lRGF0ZSkpKS50b0VxdWFsKHNvbWVEYXRlRXBvY2gpOwog ICB9KTsK --00000000000073b3e0058110532e--