Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(42)

Issue 9837049: code review 9837049: testing: quantize AllocsPerRun (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 1 month ago by r
Modified:
11 years, 7 months ago
Reviewers:
kevlar, rsc
CC:
golang-dev, rsc
Visibility:
Public.

Description

testing: quantize AllocsPerRun As the code now says: We are forced to return a float64 because the API is silly, but do the division as integers so we can ask if AllocsPerRun()==1 instead of AllocsPerRun()<2.

Patch Set 1 #

Patch Set 2 : diff -r 60d35f8bbbf2 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M src/pkg/testing/allocs.go View 1 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 6
r
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
12 years, 1 month ago (2013-05-30 15:11:39 UTC) #1
rsc
LGTM
12 years, 1 month ago (2013-05-30 15:20:49 UTC) #2
rsc
Please update the doc comment to note that the values returned are integers.
12 years, 1 month ago (2013-05-30 15:21:04 UTC) #3
r
*** Submitted as https://code.google.com/p/go/source/detail?r=322bd4cbe91e *** testing: quantize AllocsPerRun As the code now says: We are ...
12 years, 1 month ago (2013-05-30 15:28:11 UTC) #4
kevlar
On 2013/05/30 15:28:11, r wrote: > *** Submitted as https://code.google.com/p/go/source/detail?r=322bd4cbe91e *** > > testing: quantize ...
11 years, 7 months ago (2013-12-09 10:55:28 UTC) #5
rsc
11 years, 7 months ago (2013-12-09 12:58:06 UTC) #6
The problem is that amortized background work means that if you do 100 runs
you might end up with 1.01 allocs per run, failing the == 1 test.

The goal is to count allocations that happen every time the function is
called. Those contribute to the integer part. The goal is to NOT count
allocations that only happen sometimes.

You are arguing for different goals.

Russ
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b