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

improve: move all onKill events to registed onDeath #1759

Merged
merged 4 commits into from
Nov 2, 2023
Merged

Conversation

luan
Copy link
Contributor

@luan luan commented Oct 28, 2023

Alternative implementation of #1665

This change deprecates onKill (you'll get a warning if you try to use onKill, but it'll keep working until we decide to delete the callback from the source. Taking advantage of registed onDeath events and the fact that mechanics often use either damage map or the party of the top damage dealer.

It also fixes a lot of inconsistencies in how kill tasks work, making most systems match what they should do when doing quests in a group.

Full credit to @duuh30 for finding the issue and exploring the fix, and @beats-dh for helping with that.

(very basic) benchmarks

With this change (note, also includes #1757)

Average (Mean): Approximately 0.353 ms
Median: Approximately 0.509 ms
95th Percentile (P95): 0.675 ms

Before this change

Average (Mean): Approximately 2998.6 ms
Median: Approximately 2012.4 ms
95th Percentile (P95): 5997.9 ms

Co-Authored-By: duuh30 [email protected]
Co-Authored-By: beats-dh [email protected]

@luan luan force-pushed the luan/no-more-onkill branch from 0df66de to 1f72a76 Compare November 2, 2023 18:59
Copy link

sonarqubecloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@luan luan merged commit 436bcac into main Nov 2, 2023
37 checks passed
@luan luan deleted the luan/no-more-onkill branch November 2, 2023 22:53
marcusvcj pushed a commit to marcusvcj/canary that referenced this pull request Nov 4, 2023
Alternative implementation of opentibiabr#1665

This change deprecates `onKill` (you'll get a warning if you try to use
`onKill`, but it'll keep working until we decide to delete the callback
from the source. Taking advantage of registed `onDeath` events and the
fact that mechanics often use either damage map or the party of the top
damage dealer.

It also fixes a lot of inconsistencies in how kill tasks work, making
most systems match what they should do when doing quests in a group.

Full credit to @duuh30 for finding the issue and exploring the fix, and
@beats-dh for helping with that.

## (very basic) benchmarks

### With this change (note, also includes opentibiabr#1757)

```
Average (Mean): Approximately 0.353 ms
Median: Approximately 0.509 ms
95th Percentile (P95): 0.675 ms
```

### Before this change

```
Average (Mean): Approximately 2998.6 ms
Median: Approximately 2012.4 ms
95th Percentile (P95): 5997.9 ms
```
marcusvcj pushed a commit to marcusvcj/canary that referenced this pull request Nov 20, 2023
Alternative implementation of opentibiabr#1665

This change deprecates `onKill` (you'll get a warning if you try to use
`onKill`, but it'll keep working until we decide to delete the callback
from the source. Taking advantage of registed `onDeath` events and the
fact that mechanics often use either damage map or the party of the top
damage dealer.

It also fixes a lot of inconsistencies in how kill tasks work, making
most systems match what they should do when doing quests in a group.

Full credit to @duuh30 for finding the issue and exploring the fix, and
@beats-dh for helping with that.

```
Average (Mean): Approximately 0.353 ms
Median: Approximately 0.509 ms
95th Percentile (P95): 0.675 ms
```

```
Average (Mean): Approximately 2998.6 ms
Median: Approximately 2012.4 ms
95th Percentile (P95): 5997.9 ms
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants