Claudio Costa
1e53fe85ad
[MM-21378] Add mutex to model.Post to guard against race conditions on Post.Props (#13884)
* Add mutex to model.Post to guard against race conditions on Post.Props
* Rename mutex
* Add GetProp() method to Post
* Fix more tests
* Fix flaky test
Benchmarks:
BenchmarkPostPropsGet_indirect
BenchmarkPostPropsGet_indirect-2 85026746 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-4 90273747 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-8 88324293 13.0 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_indirect-16 91427720 13.1 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct
BenchmarkPostPropsGet_direct-2 1000000000 0.242 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-4 1000000000 0.241 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-8 1000000000 0.240 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsGet_direct-16 1000000000 0.241 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_indirect
BenchmarkPostPropsAdd_indirect-2 5602224 203 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-4 5959496 206 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-8 5833999 205 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_indirect-16 5802493 225 ns/op 336 B/op 2 allocs/op
BenchmarkPostPropsAdd_direct
BenchmarkPostPropsAdd_direct-2 100000000 11.3 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-4 100000000 11.3 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-8 100000000 11.6 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsAdd_direct-16 99840794 11.4 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_indirect
BenchmarkPostPropsDel_indirect-2 18824002 61.9 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-4 19470736 63.8 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-8 17640460 65.3 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_indirect-16 18692962 65.4 ns/op 48 B/op 1 allocs/op
BenchmarkPostPropsDel_direct
BenchmarkPostPropsDel_direct-2 516257440 2.34 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-4 514865216 2.43 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-8 511330477 2.37 ns/op 0 B/op 0 allocs/op
BenchmarkPostPropsDel_direct-16 499504010 2.38 ns/op 0 B/op 0 allocs/op
2020-03-13 21:12:20 +01:00
..
2019-11-29 12:59:40 +01:00
2020-02-14 18:08:00 -05:00
2020-03-10 12:41:29 +01:00
2020-02-13 13:26:58 +01:00
2020-02-14 18:08:00 -05:00
2020-02-14 16:21:54 -04:00
2020-02-14 16:21:54 -04:00
2020-02-14 15:47:43 -05:00
2019-09-24 13:48:33 -04:00
2019-11-04 17:35:58 -08:00
2018-07-13 10:29:50 -04:00
2020-02-14 15:47:43 -05:00
2020-03-02 14:22:48 -05:00
2020-03-13 21:12:20 +01:00
2020-02-03 08:19:38 -08:00
2020-02-14 15:47:43 -05:00
2020-01-24 09:00:35 +05:30
2019-12-19 20:52:41 +01:00
2020-03-13 21:12:20 +01:00
2020-01-29 20:41:25 +01:00
2020-01-29 20:41:25 +01:00
2020-02-17 15:44:34 -05:00
2020-02-17 15:44:34 -05:00
2020-03-10 12:41:29 +01:00
2020-03-10 12:41:29 +01:00
2020-03-10 12:41:29 +01:00
2020-02-14 15:47:43 -05:00
2019-11-29 12:59:40 +01:00
2019-12-05 20:31:53 +01:00
2018-09-03 14:08:40 +02:00
2019-11-29 12:59:40 +01:00
2019-11-29 12:59:40 +01:00
2020-02-14 15:47:43 -05:00
2020-03-11 11:41:11 +04:00