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

Explicitly stop the Exporter when main routines are done. #860

Merged
merged 2 commits into from
May 6, 2024

Conversation

jaqx0r
Copy link
Contributor

@jaqx0r jaqx0r commented May 6, 2024

The Exporter and HTTPServer are not connected by channels to the Runtime,
only indirectly through mutating effects on the Store. As such we can't rely on
the Exporter to shut down automatically when the Runtime shuts down.

Here instead we remove the WaitGroup and allow an Exporter to be shut down
explicitly after the WaitGroup is Done.

Issue: #331

jaqx0r added 2 commits May 6, 2024 22:32
The `Exporter` and `HTTPServer` are not connected by channels to the `Runtime`, only
indirectly through mutating effects on the Store.  As such we can't rely on the
`Exporter` to shut down automatically when the `Runtime` shuts down.

Here instead we remove the `WaitGroup` and allow an `Exporter` to be shut down
explicitly after the `WaitGroup` is `Done`.

Issue: #331
@jaqx0r jaqx0r enabled auto-merge May 6, 2024 12:40
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 64c82f4 Previous: 28136c2 Ratio
BenchmarkStore/Add 2309 ns/op 821.1 ns/op 2.81
BenchmarkStore/Add 4430 ns/op 821.1 ns/op 5.40
BenchmarkStore/Add 8757 ns/op 821.1 ns/op 10.66
BenchmarkStore/Add 17096 ns/op 821.1 ns/op 20.82
BenchmarkStore/Add 34693 ns/op 821.1 ns/op 42.25
BenchmarkStore/Add 75768 ns/op 821.1 ns/op 92.28
BenchmarkStore/Add 146179 ns/op 821.1 ns/op 178.03
BenchmarkStore/Add 307868 ns/op 821.1 ns/op 374.95
BenchmarkStore/Add 628667 ns/op 821.1 ns/op 765.64
BenchmarkStore/AddParallel 2310 ns/op 815.3 ns/op 2.83
BenchmarkStore/AddParallel 4489 ns/op 815.3 ns/op 5.51
BenchmarkStore/AddParallel 8717 ns/op 815.3 ns/op 10.69
BenchmarkStore/AddParallel 17338 ns/op 815.3 ns/op 21.27
BenchmarkStore/AddParallel 34501 ns/op 815.3 ns/op 42.32
BenchmarkStore/AddParallel 70698 ns/op 815.3 ns/op 86.71
BenchmarkStore/AddParallel 150548 ns/op 815.3 ns/op 184.65
BenchmarkStore/AddParallel 312142 ns/op 815.3 ns/op 382.86
BenchmarkStore/AddParallel 625977 ns/op 815.3 ns/op 767.79
BenchmarkStore/AddWithGc 6221 ns/op 2444 ns/op 2.55
BenchmarkStore/AddWithGc 10789 ns/op 2444 ns/op 4.41
BenchmarkStore/AddWithGc 19554 ns/op 2444 ns/op 8.00
BenchmarkStore/AddWithGc 38313 ns/op 2444 ns/op 15.68
BenchmarkStore/AddWithGc 77764 ns/op 2444 ns/op 31.82
BenchmarkStore/AddWithGc 155124 ns/op 2444 ns/op 63.47
BenchmarkStore/AddWithGc 314152 ns/op 2444 ns/op 128.54
BenchmarkStore/AddWithGc 651627 ns/op 2444 ns/op 266.62
BenchmarkStore/AddWithGcParallel 2303 ns/op 818.7 ns/op 2.81
BenchmarkStore/AddWithGcParallel 4453 ns/op 818.7 ns/op 5.44
BenchmarkStore/AddWithGcParallel 8822 ns/op 818.7 ns/op 10.78
BenchmarkStore/AddWithGcParallel 17144 ns/op 818.7 ns/op 20.94
BenchmarkStore/AddWithGcParallel 35898 ns/op 818.7 ns/op 43.85
BenchmarkStore/AddWithGcParallel 71355 ns/op 818.7 ns/op 87.16
BenchmarkStore/AddWithGcParallel 145633 ns/op 818.7 ns/op 177.88
BenchmarkStore/AddWithGcParallel 302984 ns/op 818.7 ns/op 370.08
BenchmarkStore/AddWithGcParallel 615102 ns/op 818.7 ns/op 751.32
BenchmarkStore/Iterate 732.6 ns/op 361.4 ns/op 2.03
BenchmarkStore/Iterate 1125 ns/op 361.4 ns/op 3.11
BenchmarkStore/Iterate 1908 ns/op 361.4 ns/op 5.28
BenchmarkStore/Iterate 3580 ns/op 361.4 ns/op 9.91
BenchmarkStore/Iterate 6930 ns/op 361.4 ns/op 19.18
BenchmarkStore/Iterate 13490 ns/op 361.4 ns/op 37.33
BenchmarkStore/IterateParallel 707.7 ns/op 336.5 ns/op 2.10
BenchmarkStore/IterateParallel 1097 ns/op 336.5 ns/op 3.26
BenchmarkStore/IterateParallel 1874 ns/op 336.5 ns/op 5.57
BenchmarkStore/IterateParallel 3443 ns/op 336.5 ns/op 10.23
BenchmarkStore/IterateParallel 6796 ns/op 336.5 ns/op 20.20
BenchmarkStore/IterateParallel 13628 ns/op 336.5 ns/op 40.50
BenchmarkStore/IterateWithGc 3885 ns/op 1883 ns/op 2.06
BenchmarkStore/IterateWithGc 5434 ns/op 1883 ns/op 2.89
BenchmarkStore/IterateWithGc 9623 ns/op 1883 ns/op 5.11
BenchmarkStore/IterateWithGc 17464 ns/op 1883 ns/op 9.27
BenchmarkStore/IterateWithGc 31327 ns/op 1883 ns/op 16.64
BenchmarkStore/IterateWithGcParallel 704.7 ns/op 336.9 ns/op 2.09
BenchmarkStore/IterateWithGcParallel 1092 ns/op 336.9 ns/op 3.24
BenchmarkStore/IterateWithGcParallel 1911 ns/op 336.9 ns/op 5.67
BenchmarkStore/IterateWithGcParallel 3577 ns/op 336.9 ns/op 10.62
BenchmarkStore/IterateWithGcParallel 6830 ns/op 336.9 ns/op 20.27
BenchmarkStore/IterateWithGcParallel 13530 ns/op 336.9 ns/op 40.16
BenchmarkMetric/GetDatum 2986 ns/op 776.4 ns/op 3.85
BenchmarkMetric/GetDatum 5673 ns/op 776.4 ns/op 7.31
BenchmarkMetric/GetDatum 11174 ns/op 776.4 ns/op 14.39
BenchmarkMetric/GetDatum 22645 ns/op 776.4 ns/op 29.17
BenchmarkMetric/GetDatum 48426 ns/op 776.4 ns/op 62.37
BenchmarkMetric/GetDatum 105998 ns/op 776.4 ns/op 136.52
BenchmarkMetric/GetDatum 242224 ns/op 776.4 ns/op 311.98
BenchmarkMetric/GetDatum 518683 ns/op 776.4 ns/op 668.06
BenchmarkMetric/GetDatum 1016170 ns/op 776.4 ns/op 1308.82
BenchmarkMetric/GetDatum 2108739 ns/op 776.4 ns/op 2716.05
BenchmarkMetric/GetDatum 4580140 ns/op 776.4 ns/op 5899.20
BenchmarkMetric/GetDatumParallel 2682 ns/op 912.2 ns/op 2.94
BenchmarkMetric/GetDatumParallel 6078 ns/op 912.2 ns/op 6.66
BenchmarkMetric/GetDatumParallel 12027 ns/op 912.2 ns/op 13.18
BenchmarkMetric/GetDatumParallel 22918 ns/op 912.2 ns/op 25.12
BenchmarkMetric/GetDatumParallel 48172 ns/op 912.2 ns/op 52.81
BenchmarkMetric/GetDatumParallel 111217 ns/op 912.2 ns/op 121.92
BenchmarkMetric/GetDatumParallel 245329 ns/op 912.2 ns/op 268.94
BenchmarkMetric/GetDatumParallel 522054 ns/op 912.2 ns/op 572.30
BenchmarkMetric/GetDatumParallel 1027080 ns/op 912.2 ns/op 1125.94
BenchmarkMetric/GetDatumParallel 2152733 ns/op 912.2 ns/op 2359.94
BenchmarkMetric/GetDatumParallel 5037450 ns/op 912.2 ns/op 5522.31

This comment was automatically generated by workflow using github-action-benchmark.

@jaqx0r jaqx0r added this pull request to the merge queue May 6, 2024
Copy link
Contributor

github-actions bot commented May 6, 2024

Unit Test Results

    1 files     27 suites   8m 52s ⏱️
  648 tests   647 ✅ 1 💤 0 ❌
1 917 runs  1 914 ✅ 3 💤 0 ❌

Results for commit 64c82f4.

Merged via the queue into main with commit 4e8528c May 6, 2024
23 checks passed
@jaqx0r jaqx0r deleted the exporter-shutdown branch May 6, 2024 12:51
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

Successfully merging this pull request may close these issues.

1 participant