tableau / community-tableau-server-insights

Community-built data sources for answering questions about Tableau Server
MIT License
129 stars 52 forks source link

TS Web Requests -Incorrect Duration for requests #56

Closed rk2511 closed 3 years ago

rk2511 commented 3 years ago

I saw that the calculation used for the duration is FLOAT(DATEDIFF('second',created at, completed at)). Even then this is rounding off the value to integers. Also, more importantly, for some type of requests the duration is getting rounded off to zero.

This can be replicated and found out by Create a calculated filed - (Completed at - Created at)*86400 Compare the results

mcoles commented 3 years ago

Rounding to the nearest whole second was the original intention, primarily because getting more precision didn't seem to matter much in terms of viz load performance analysis, and it would have required more complex calcs. But I think you're right that it's important to do, so I'll edit it to include millisecond precision.

rk2511 commented 3 years ago

Hi mcoles, Thanks for the response. I highlighted the problem not for the precision but because the difference between the actual and expected was huge. For example, When using (Completed at - Created at)*86400 lets say we get a value 10 but with FLOAT(DATEDIFF('second',created at, completed at)) the value would be like say 15.

mcoles commented 3 years ago

Yep, that makes sense--thanks for sending this in!