Code review comment for lp:~prafulla-t/drizzle/drz-fast-timer-and-time-profile-refactoring

Revision history for this message
PrafullaT (prafulla-t) wrote :

Hi,
Thanks for review Brian.

> Hi!
>
> A couple of things:
>
> 1) We want to avoid using pthread_key_t because it ties sessions to threads,
> and we want sessions to float between threads.

I see , I wanted profile code to be done for a single thread to avoid having
thread related complexity(mutex etc) in profiling code.
Do you suggest creating independent pthread_key_t for ThreadProfile ?
That was my original plan but then I saw sessions are created per thread so I hung
threadprofile object pointer off that class.

> 2) At the beginning of each query we call gettimeofday() in Session. You can
> base any calls you need off of that initially.
>
> 3) The style in the code is off from our coding style.

I will work on the style.

>
> How can we provide this data to a user? Have you thought about providing a
> table function to display it for the last query?

User ?
I thought this would be useful for developer working on drizzle code as profiling
related code will most probably have names of internal function etc.
But yes, the data can be made available to use through some user variable.
I'll think about this.

--
Thanks
Prafulla

« Back to merge proposal