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

Callbacks perf #14915

Merged
merged 23 commits into from
Jul 4, 2019
Merged

Callbacks perf #14915

merged 23 commits into from
Jul 4, 2019

Conversation

ggazzo
Copy link
Member

@ggazzo ggazzo commented Jul 2, 2019

I used:

const combine = (f, x) => (e, ...constants) => x(f(e, ...constants), ...constants);

to create a single function to avoid .reduce each time we invoke a callback.

I set a name for each callback to help Prometheus to show the callbacks name properly

I removed the timers, and created a wrappers IF we want to use, if not we dont need track this time anymore.

@ggazzo ggazzo requested a review from sampaiodiego July 2, 2019 18:50
@ggazzo ggazzo requested review from cardoso and d-gubert and removed request for cardoso July 2, 2019 20:11
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
Co-Authored-By: Diego Sampaio <chinello@gmail.com>
};


const empty = (e) => e;
Copy link
Member

Choose a reason for hiding this comment

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

👎

ggazzo and others added 2 commits July 2, 2019 19:22
Co-Authored-By: Diego Sampaio <chinello@gmail.com>
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
app/graphql/server/resolvers/messages/chatMessageAdded.js Outdated Show resolved Hide resolved
app/search/server/events/events.js Outdated Show resolved Hide resolved
Co-Authored-By: Diego Sampaio <chinello@gmail.com>
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
app/callbacks/lib/callbacks.js Outdated Show resolved Hide resolved
@ggazzo ggazzo merged commit 3661c63 into develop Jul 4, 2019
@ggazzo ggazzo deleted the callbacks-perf branch July 4, 2019 00:46
@sampaiodiego sampaiodiego mentioned this pull request Aug 2, 2019
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.

None yet

3 participants