Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about using hard-coded display of P99 Latency in measurement.getInfo() #186

Open
Barber0 opened this issue Jun 20, 2021 · 1 comment

Comments

@Barber0
Copy link

Barber0 commented Jun 20, 2021

I noticed that go-ycsb mainly applies cumulative histogram to do the P99 Latency's statistic. Users could set histogram.buckets' interval through properties config.

Though the 'bound' is calculated based on the microsecond latency and configurable 'boundInterval', the code responsible for P99 latency calculation still hardcode 1000 as the bound interval.

If users customize the 'histogram bucket interval' as 1, is it possible to cause display errors? Because the time unit you display on P99 is 'us' (microseconds), 'bound' calculated with interval 1 may represents the real microseconds, after hardcoded calculation, the 'us' you display may represent the 1000 times of the real latency?

https://github.com/pingcap/go-ycsb/blob/master/pkg/measurement/histogram.go
per99 = (bound + 1) * 1000

per99 := 0
per999 := 0
per9999 := 0

opCount := int64(0)
for _, bound := range bounds {
	boundCount, _ := h.boundCounts.Get(bound)
	opCount += boundCount
	per := float64(opCount) / float64(count)
	if per99 == 0 && per >= 0.99 {
		per99 = (bound + 1) * 1000
	}

	if per999 == 0 && per >= 0.999 {
		per999 = (bound + 1) * 1000
	}

	if per9999 == 0 && per >= 0.9999 {
		per9999 = (bound + 1) * 1000
	}
}
@Barber0
Copy link
Author

Barber0 commented Jun 20, 2021

Meanwhile, there still isn't binding for Memcached's benchmark, but I want to apply this project on a Memcached benchmark related project.
I have simply added some code for Memcached benchmark for this project. Can you review the PR in this area?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant