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

Poor man's profiling #792

Closed
wants to merge 2 commits into from
Closed

Poor man's profiling #792

wants to merge 2 commits into from

Conversation

paterczm
Copy link
Contributor

@paterczm paterczm commented Jun 8, 2017

A very simple and unintrusive logging of crud operations which take more than 5 seconds, in lieu of proper profiling instrumentation. Main purpose is to be able to see inside bulk operations.

Here is how a log line looks:

[main] WARN stopwatch.com.redhat.lightblue.mediator.Mediator - #find({"entity":"A","entityVersion":"1.0.0","op":"FIND","query":{"field":"obj1.c.*.field1","op":"$eq","rvalue"
:"ABFPwrjyx-o5DQWWZmSEfKf3W1z"},"projection":[{"field":"*","include":true,"recursive":true} in 3.04ms

There is no way to configure this without recompilation (except configuring the logger to stop logging this).

@paterczm
Copy link
Contributor Author

paterczm commented Jun 8, 2017

This solution has "smart time" feature (jcabi/jcabi-aspects#222), which changes time unit depending on the duration. Not parsing friendly.

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