I agree it is arbitrary and sub-optimal solution but maybe I still liked it more before the last commit: the risk now is that we have too much information and no one will ever look at it. The obvious workaround could be to set the threshold in a property file but there are probably better solutions that will require more work and design: for example it would be nice to enable usage statistical collections on services and entities (e.g. how many times a service was executed, the average time of execution, max time etc...) and then show this data in a screen; we could store this data in an entity or a file or, maybe better, keep it in memory (in a cache or similar) and let an admin enable/disable/reset this while the system is running (similarly to cache entries).
Just my 2 cents, Jacopo On Apr 4, 2013, at 9:22 AM, Adrian Crum <[email protected]> wrote: > Why not 20 or 30 or 40? > > That's the problem with arbitrary values - they don't mean anything. > > From my perspective, if anyone has timing enabled, then they want to see > what's going on in the system. > > Feel free to change it. > > -Adrian > > On 4/3/2013 9:22 AM, Jacques Le Roux wrote: >> Hi Adrian, All, >> >> Should we really show the timing for all services? >> Maybe increasing from 50 to 75 or even 100 for the 1st case would be enough? >> >> Jacques >> >> From: <[email protected]> >>> Author: adrianc >>> Date: Wed Apr 3 07:57:24 2013 >>> New Revision: 1463863 >>> >>> URL: http://svn.apache.org/r1463863 >>> Log: >>> Log message cleanup in ServiceDispatcher.java. Removed confusing text about >>> services taking too long. >>> >>> Modified: >>> >>> ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java >>> >>> Modified: >>> ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=1463863&r1=1463862&r2=1463863&view=diff >>> ============================================================================== >>> --- >>> ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java >>> (original) >>> +++ >>> ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java >>> Wed Apr 3 07:57:24 2013 >>> @@ -571,10 +571,8 @@ public class ServiceDispatcher { >>> rs.setEndStamp(); >>> >>> long timeToRun = System.currentTimeMillis() - serviceStartTime; >>> - if (Debug.timingOn() && timeToRun > 50) { >>> - Debug.logTiming("Slow sync service execution detected: service >>> [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + >>> "] milliseconds", module); >>> - } else if (Debug.infoOn() && timeToRun > 200) { >>> - Debug.logInfo("Very slow sync service execution detected: >>> service [" + localName + "/" + modelService.name + "] finished in [" + >>> timeToRun + "] milliseconds", module); >>> + if (Debug.timingOn()) { >>> + Debug.logTiming("Sync service [" + localName + "/" + >>> modelService.name + "] finished in [" + timeToRun + "] milliseconds", >>> module); >>> } >>> if ((Debug.verboseOn() || modelService.debug) && timeToRun > 50 && >>> !modelService.hideResultInLog) { >>> // Sanity check - some service results can be multiple MB in >>> size. Limit message size to 10K. >>> >>> >
