signoz icon indicating copy to clipboard operation
signoz copied to clipboard

experiment: custom running difference function for rate

Open srikanthccv opened this issue 3 years ago • 3 comments

Part of #1294

This is an experiment to use executable UDF to adjust for counter resets when calculating rate. Since this function is usually applied to limited number of points in the result I have used maximum of 10k values for comparing the response times.


Number of values runningDiff runningDiffCustom
- 10 ~ 0.01 ~ 0.03
- 50 ~ 0.01 ~ 0.03-0.035
- 100 ~ 0.02 ~ 0.03-0.05
- 200 ~ 0.025 ~ 0.04
- 500 ~ 0.025-.03 ~ 0.04
- 1000 ~ 0.033 ~ 0.05
- 2000 ~ 0.04 ~ 0.05
- 5000 ~ 0.05 ~ 0.07
- 10000 ~ 0.065 ~ 0.07

This as is not really ready be used because runningDifference function returns a table with columns but user defined function need to return type such as Array(Float64). The result type needs to be correlated to rows it was pivoted from. There appears to be a way to read the intermediary table and return processed table back https://github.com/ClickHouse/ClickHouse/blob/36d1c8238a03d2dbe29c4b872ec50bfeb63fa693/tests/integration/test_executable_table_function/test.py#L95.

srikanthccv avatar Jun 29 '22 03:06 srikanthccv

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

github-actions[bot] avatar Jun 29 '22 03:06 github-actions[bot]

cc // @ankitnayan

srikanthccv avatar Jun 29 '22 03:06 srikanthccv

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jun 29 '22 03:06 sonarqubecloud[bot]

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Jan 04 '23 16:01 sonarqubecloud[bot]

Will be superseded by other PR

srikanthccv avatar Jan 04 '23 18:01 srikanthccv