Skip to content

Conversation

@karrtikr
Copy link

@karrtikr karrtikr commented Sep 6, 2019

For #7218

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • [ ] Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • [ ] The wiki is updated with any design decisions/details.

@codecov-io
Copy link

codecov-io commented Sep 6, 2019

Codecov Report

Merging #7260 into master will decrease coverage by 0.04%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #7260      +/-   ##
=========================================
- Coverage   58.34%   58.3%   -0.05%     
=========================================
  Files         493     493              
  Lines       21661   21674      +13     
  Branches     3486    3487       +1     
=========================================
- Hits        12639   12636       -3     
- Misses       8242    8257      +15     
- Partials      780     781       +1
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø) ⬆️
src/client/common/experiments.ts 97.19% <100%> (+0.08%) ⬆️
src/client/common/crypto.ts 73.33% <60%> (-8.49%) ⬇️
src/client/common/utils/platform.ts 76.47% <0%> (-11.77%) ⬇️
src/client/common/logger.ts 68.55% <0%> (-6.92%) ⬇️
src/client/common/installer/productInstaller.ts 76.71% <0%> (-0.53%) ⬇️
src/client/datascience/constants.ts 100% <0%> (ø) ⬆️
.../datascience/interactive-common/interactiveBase.ts 6.41% <0%> (ø) ⬆️
src/datascience-ui/interactive-common/mainState.ts 0% <0%> (ø) ⬆️
src/client/datascience/types.ts 100% <0%> (ø) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94abff9...9d3cbc5. Read the comment docs.

@luabud
Copy link
Member

luabud commented Sep 10, 2019

we should include the LS experiment to use the sha512 algorithm as well

cc @gramster

Copy link

@kimadeline kimadeline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Can you open a code health issue to remove the SHA512 hashing code when we retire all the old experiments?
  • What was the final answer for your message about the distribution test?

I have written a test, verifying

  • on small changes in input, the difference between outputs is large on average (~ 33% in our case)
  • average hit per bucket is as expected
  • hits for each bucket should be close to average hit

But still in worst case, this could be flaky. So I think we should maybe not include this test, as we have verified each fact manually.

@karrtikr
Copy link
Author

karrtikr commented Sep 11, 2019

Can you open a code health issue to remove the SHA512 hashing code when we retire all the old experiments?

Here #7333

What was the final answer for your message about the distribution test?

He didn't object to it, so I guess he agrees. You may want to ask him again.

@gramster
Copy link
Member

Please do add a dispersion unit test. If you (say) hash each of the integers from 1 to 10000 (converted to strings), then you want to test that no bucket has less than 75 hits. That should be sufficient and is very unlikely to fail.

@karrtikr karrtikr requested a review from kimadeline September 12, 2019 00:42
Copy link

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I only have a few mild comments.

}
}
// Total number of words = wordList.length * 10, because we added ten variants of each word above.
const expectedHitsPerBucket = wordList.length * 10 / 100;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like some of the items in wordList are ignored. Shouldn't that be reflected here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually we don't need to ignore anything, so removing that line.

@karrtikr
Copy link
Author

@ericsnowcurrently Addressed most of the comments. I found the other minor comments mainly stylistic, so leaving those.

@karrtikr karrtikr merged commit db297c4 into microsoft:master Sep 17, 2019
@karrtikr karrtikr deleted the exps branch September 17, 2019 17:14
@lock lock bot locked as resolved and limited conversation to collaborators Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants