public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: Sahil Harpal <[email protected]>
Cc: Khushboo Vashi <[email protected]>
Cc: [email protected]
Cc: Ashesh Vashi <[email protected]>
Cc: Dave Page <[email protected]>
Cc: Akshay Joshi <[email protected]>
Subject: Re: Pgadmin4 System Stats Extension Design
Date: Mon, 7 Aug 2023 17:11:50 +0530
Message-ID: <CAM9w-_nJWCnnQvXozGgrXVwhJwQ3hfeFZfKe+mKJHM5nox2AhA@mail.gmail.com> (raw)
In-Reply-To: <CAKi=nncRPLHwHZ+53vFuF7sB87tTLYXEbD4FPVnAbt8qhLonug@mail.gmail.com>
References: <CAKi=nneJvdbFyeDKnuQTVEnhNK0Zjdx5TWSwGUUSZO9YTC5E7Q@mail.gmail.com>
<CANxoLDfO4BE0xvGLA3EBYyAzt3hCmuRcMY_pR3Zci9nPbL7P1Q@mail.gmail.com>
<CAKi=nndnvAwgXVC=i=x3sSxNS9UCfks+EQWEjx8n5=u9CCP8og@mail.gmail.com>
<CANxoLDeNzZkxYEnLdkFMkugvk7_k+BDSt6AoH83aaMkP+VZirQ@mail.gmail.com>
<CAM9w-_mC2JKvxKKRwF7xCzoggoo0_XqBgUyqWDxXqSRQs_a0eg@mail.gmail.com>
<CAKi=nncQ+OqkJ2PfvNNs40h5PfkO57YKTMEXdYeOpxUXhTzj5A@mail.gmail.com>
<CA+OCxowriuEED8BC7DRZKwCM3dOfNaDWhf+vhJsH2PWq88yc7w@mail.gmail.com>
<CAKi=nncY7wdMyqT2tKRAVWDaFSsgUS_qnOz0aifd-BorScUNSw@mail.gmail.com>
<CA+OCxoyog3cqhZcEQ1xenmHUFMLM+VS8j91GM_RnU3VK8bGjaQ@mail.gmail.com>
<CAKi=nncGiLTK36jQWnGL-0DToo4qTqojf+iLbDvRTfk2z_48Uw@mail.gmail.com>
<CA+OCxowEmnWJHRa=QnuZpn42Cn594XZVduMPJuOg5MbdeQx0aw@mail.gmail.com>
<CAKi=nnfMHZSGP3G+gS9JSLNp2C=BHF2ztsz6W0mpBREc4y=hiQ@mail.gmail.com>
<CA+OCxowt2XSCEOxZ+Mz1CzMGQv5MCNV+GZO2b3E5PtZj1YgYOA@mail.gmail.com>
<CAKi=nndoS4g8MmOBD6wZKCtGotpmxDa17rq8-obv3B9MaSbYjg@mail.gmail.com>
<CA+OCxozjkCkVOFabHbMP+1sZ+hKftXA6Z8q00c+A2=mYHKbcuQ@mail.gmail.com>
<CAKi=nncko8TQVyGtEn_89DtZoztdhOA_e2-wSe8wROjZADgbXg@mail.gmail.com>
<CAKi=nnfj2OcTBkUoWwMZ5YifExgrxs9Pbt42-2W1+n32LEmgvQ@mail.gmail.com>
<CAG7mmow-bPFycSZeY_-=JbhmdH7qHud2GHiiZTfcNPhnsruQaA@mail.gmail.com>
<CAKi=nnfeEf6dQYcDyUExJK+1Xo5NgCHrpgfZPjS56B2rrUmd=w@mail.gmail.com>
<CAM9w-_=-jmhjh9Mp98pvwBxp_DDoeMexnR2Y23+=-wR+tsDOiQ@mail.gmail.com>
<CAKi=nneNLFiOUPQ16ZzO1RM8K8V=qoqa=AtmewkRzLjnjJhyUA@mail.gmail.com>
<CAFOhELe-EAiVN6YjmAo1VjW-b+Bw3yPC6Ghxy=X6P-y4EF_EgA@mail.gmail.com>
<CAKi=nndAi2iBN1P5y+XWdTa9EnL5b_FzhK4AG_9duUKxZE5=fw@mail.gmail.com>
<CAKi=nndU8oESoER=MF7yaaUKiNd1fV7GDECGgLv_jumxs8EmTQ@mail.gmail.com>
<CAFOhELdpnz1o-CYCmH=3x2u6XMWDXd6gbiWejL3dMq+LSu8QDQ@mail.gmail.com>
<CAFOhELdT30L7OYj3MbQtkaHLHaRuMP3inV4t_wHkiJBOiJ=8TA@mail.gmail.com>
<CAKi=nncg3M=ZE9JTzVYb-ox83quNO8i_=C3_34AhX1wckk0mbA@mail.gmail.com>
<CAM9w-_=5Dnu4Dn9tg77GtAtaV7=vgyeSqkq0uLkt_c_K1Om2rg@mail.gmail.com>
<CAKi=nncNHn9D8L-R3HmBPGN+zcBsbg_ceXE3O-XoASwMq-pzKg@mail.gmail.com>
<CAM9w-_=KM9+onud=Co54voWNZXymOzzCkmMxfCjkU_-sNOOViQ@mail.gmail.com>
<CAKi=nncRPLHwHZ+53vFuF7sB87tTLYXEbD4FPVnAbt8qhLonug@mail.gmail.com>
On Mon, Aug 7, 2023 at 4:47 PM Sahil Harpal <[email protected]>
wrote:
> Hi Aditya,
> On Mon, 7 Aug 2023 at 11:01, Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Sahil,
>> I would suggest changing the behaviour in StreamingChart so that it can
>> be used at other places. If you want to reverse it then you can still do
>> it. I had achieved reverse direction with the following piece of code.
>> Basically, creating an array of 75 points, filling it with available points
>> and reverse. You can change it based on reverse=true flag. In your case,
>> simply reverse, not need of 75 points.
>> Array.from(new Array(xRange).keys()),
>> ...(data.datasets?.map((d)=>{
>> let ret = [...d.data];
>> ret.reverse();
>> return ret;
>> })??{}),
>>
>
> I'm a little confused here. So, the code snippet above is exactly what's
> used to initialize the data currently.
>
> The expected behavior is that the graph should start from the right side
> only. However, currently, when the page loads, for a few seconds, the
> graphs are visible on the left side and then shift to the right.
>
> I think we can skip the reverse if we make changes in the statsReducer
> method.
> action.counter ? action.incoming[label] - action.counterData[label] :
> action.incoming[label],
> ...state[label].slice(0, X_AXIS_LENGTH-1),
>
> Here, we are adding new data to the beginning and selecting the first
> X_AXIS_LENGTH-1 datapoints from the previous state. However, an alternative
> approach would be to initially take the X_AXIS_LENGTH-1 elements from the
> end of the array, then add a new element to the end. This would eliminate
> the need to reverse the array.
>
> I believe this reversal isn't causing any issues, but something might be
> occurring during graph plotting. Reversing just ensures that the most
> recent data point remains on the right within the stream.
>
OK I thought you wanted the graph to go from left to right. Yeah, I have
seen that glitch a few times (but rare). I think you can ignore it for now,
we can look into it once we get time. It is not a priority.
The reason data reversing and stuff is maintained in StreaminChart is -
Pass the data points and StreamingChart will appear from right to left.
Don't want the source to take efforts to reverse and fill.
>
> Thank you,
> Sahil
>
>
--
Thanks,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com*
<https://www.enterprisedb.com/;
"Don't Complain about Heat, Plant a TREE"
view thread (106+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Pgadmin4 System Stats Extension Design
In-Reply-To: <CAM9w-_nJWCnnQvXozGgrXVwhJwQ3hfeFZfKe+mKJHM5nox2AhA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox