Re: [Firebird-devel] ODP: SQL profiler

2021-11-10 Thread Adriano dos Santos Fernandes
On 09/11/2021 09:15, Roman Simakov wrote:
> вт, 9 нояб. 2021 г. в 14:30, Adriano dos Santos Fernandes 
> :
>>
>> Currently it's only possible via database triggers making others
>> attachments start they own sessions.
>>
>>
>>> It would be nice to have it implemented.
>>>
>>
>> Agree.
> 
> Are you going to do it?
> 

After the refactor (and bug fixes) is complete I would like to take a look.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2021-11-09 Thread Roman Simakov
вт, 9 нояб. 2021 г. в 14:30, Adriano dos Santos Fernandes :
>
> Currently it's only possible via database triggers making others
> attachments start they own sessions.
>
>
> > It would be nice to have it implemented.
> >
>
> Agree.

Are you going to do it?

> Please note I'm refactoring the profiler branch, making it via a plugin.

OK.

> But a thing didn't changed. There could only be a single active profile
> session per attachment.
>
> When profiling others attachment it's not clear for me if multiple
> active sessions per attachment should be allowed or if the remote
> session should count as active session for the initiator or the being
> profiled attachment.

I think it's not critical to have multiple active sessions. I hardly
can imagine multiple developers profiling the same session. So an
attached connection can be the owner of the profile data.

-- 
Best,
Roman Simakov


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2021-11-09 Thread Adriano dos Santos Fernandes
On 09/11/2021 08:35, Dimitry Sibiryakov wrote:
> Adriano dos Santos Fernandes wrote 09.11.2021 12:30:
>> Please note I'm refactoring the profiler branch, making it via a plugin.
> 
>   Why? Do you expect anybody to write a custom profiler?
> 

Yes.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2021-11-09 Thread Dimitry Sibiryakov

Adriano dos Santos Fernandes wrote 09.11.2021 12:30:

Please note I'm refactoring the profiler branch, making it via a plugin.


  Why? Do you expect anybody to write a custom profiler?

--
  WBR, SD.


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2021-11-09 Thread Adriano dos Santos Fernandes
On 09/11/2021 04:45, Roman Simakov wrote:
> Hello!
> 
> There are 2 threads: PSQL profiler and SQL profiler. I've decided to
> continue here)
> 
> It seems to me that profiling only the same attachment is not as
> useful as it could be.
> Imagine a working application. It's ready but you want to know where
> it spends time. You attach to the server by profiler and run profiling
> session in *your* attachment but specifying the attachment ID of the
> target. Then you run a command in the application and see collected
> data in the profiling attachment. Like the trace does where you can
> trace any activity.
> 

Currently it's only possible via database triggers making others
attachments start they own sessions.


> It would be nice to have it implemented.
> 

Agree.

Please note I'm refactoring the profiler branch, making it via a plugin.

But a thing didn't changed. There could only be a single active profile
session per attachment.

When profiling others attachment it's not clear for me if multiple
active sessions per attachment should be allowed or if the remote
session should count as active session for the initiator or the being
profiled attachment.


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2021-11-08 Thread Roman Simakov
Hello!

There are 2 threads: PSQL profiler and SQL profiler. I've decided to
continue here)

It seems to me that profiling only the same attachment is not as
useful as it could be.
Imagine a working application. It's ready but you want to know where
it spends time. You attach to the server by profiler and run profiling
session in *your* attachment but specifying the attachment ID of the
target. Then you run a command in the application and see collected
data in the profiling attachment. Like the trace does where you can
trace any activity.

It would be nice to have it implemented.

--
Best,
Roman Simakov


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2020-11-13 Thread Adriano dos Santos Fernandes
On 13/11/2020 07:32, Simonov Denis via Firebird-devel wrote:
> Adriano dos Santos Fernandes  wrote Fri, 13 Nov
> 2020 01:33:52 +0300:
>
>> On 08/11/2020 17:58, Karol Bieniaszewski wrote:
>>> Really great feature
>>>
>>> but i am worried about the title „package (FB 5.0)”.
>>>
>>> Is it for FB4 or for the future version FB5?
>>>
>>
>> I labeled it (and RDB$BLOB_UTIL) for FB 5 (or next version after 4) as
>> FB 4 was considered frozen for new development, specially for ODS
>> changes.
>>
>> But now RDB$CONFIG with same kind of ODS changes was merged in master.
>>
>> Maybe it's considered less complex or debatable feature?
>
> I think the profiler could still be improved. In particular, in
> addition to the runtime, various statistics on I/O and memory
> consumption can be collected.

I'm still failing to understand how this could be done in the current
feature spec to be useful.

I'm talking about aggregate (that's what the profiler does with multiple
execution of lines/queries) these statistics - saying that a query node
consumed a amount of memory while that node was run X times in different
moment does not help anyone.

Perhaps someone could do a more detailed spec based on what is already
documented in the feature?


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2020-11-13 Thread Adriano dos Santos Fernandes
On 13/11/2020 02:05, Dmitry Yemanov wrote:
>
>
> The profiler does look like a more complex feature and IMO it deserves
> more attention before being committed. I'm willing to communicate more
> about this, but I also have my own tasks to complete before RC1 thus
> being somewhat limited in time. It would be great it other core devs
> would share their opinions too.
>

For information, I'm doing a change in how the profiler system tables
are defined, changing its "virtual system tables with global temporary
table semantics" to actual global system temporary tables.

I believe it makes implementation more simple, without introduce new
concept for existing thing and also allow indexes usage when user query
the tables.


Adriano



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2020-11-13 Thread Simonov Denis via Firebird-devel
Adriano dos Santos Fernandes  wrote Fri, 13 Nov 2020  
01:33:52 +0300:



On 08/11/2020 17:58, Karol Bieniaszewski wrote:

Really great feature

but i am worried about the title „package (FB 5.0)”.

Is it for FB4 or for the future version FB5?



I labeled it (and RDB$BLOB_UTIL) for FB 5 (or next version after 4) as
FB 4 was considered frozen for new development, specially for ODS  
changes.


But now RDB$CONFIG with same kind of ODS changes was merged in master.

Maybe it's considered less complex or debatable feature?


I think the profiler could still be improved. In particular, in addition  
to the runtime, various statistics on I/O and memory consumption can be  
collected.


However, RDB$BLOB_UTIL looks quite complete, especially since it is just a  
system package that does not seem to change ODS significantly.





Adriano


Firebird-Devel mailing list, web interface at  
https://lists.sourceforge.net/lists/listinfo/firebird-devel



--
Simonov Denis



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2020-11-12 Thread Dmitry Yemanov

13.11.2020 01:33, Adriano dos Santos Fernandes wrote:


I labeled it (and RDB$BLOB_UTIL) for FB 5 (or next version after 4) as


For sure it's worth targeting at v4.1, not v5. Minor ODS changes are 
allowed in minor releases.



FB 4 was considered frozen for new development, specially for ODS changes.


Changes in system tables (especially in virtual tables that in fact are 
not part of the ODS) may still be allowed. I'm open to consider such 
requests.



But now RDB$CONFIG with same kind of ODS changes was merged in master.

Maybe it's considered less complex or debatable feature?


It's really not about ODS changes but about the feature itself. I've 
given an explicit permission to include the config monitoring (after 
review, of course), because it just exposes what we already have 
internally and the changes are mostly isolated inside the config module.


The profiler does look like a more complex feature and IMO it deserves 
more attention before being committed. I'm willing to communicate more 
about this, but I also have my own tasks to complete before RC1 thus 
being somewhat limited in time. It would be great it other core devs 
would share their opinions too.



Dmitry


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] ODP: SQL profiler

2020-11-12 Thread Adriano dos Santos Fernandes
On 08/11/2020 17:58, Karol Bieniaszewski wrote:
> Really great feature
> 
> but i am worried about the title „package (FB 5.0)”.
> 
> Is it for FB4 or for the future version FB5?
> 

I labeled it (and RDB$BLOB_UTIL) for FB 5 (or next version after 4) as
FB 4 was considered frozen for new development, specially for ODS changes.

But now RDB$CONFIG with same kind of ODS changes was merged in master.

Maybe it's considered less complex or debatable feature?


Adriano


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] ODP: SQL profiler

2020-11-08 Thread Karol Bieniaszewski
Really great feature 
but i am worried about the title „package (FB 5.0)”.
Is it for FB4 or for the future version FB5?

regards,
Karol Bieniaszewski
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel