DockerFile should have JProfiler installation.
RUN wget <JProfiler file location> -P /tmp/ && \
tar -xzf /tmp/<JProfiler file> -C /usr/local && \
rm /tmp/<JProfiler file>
| Будильник | |
| Зарядка | |
| Акварель | |
| Травма | |
| Оригами | |
| Пульс | |
| Спорт | |
| Канатоходец | |
| Магнитофон | |
| Халат |
| val rejectionHandler = RejectionHandler.default | |
| def logDuration(inner: Route): Route = { ctx => | |
| val start = System.currentTimeMillis() | |
| // handling rejections here so that we get proper status codes | |
| val innerRejectionsHandled = handleRejections(rejectionHandler)(inner) | |
| mapResponse { resp => | |
| val d = System.currentTimeMillis() - start | |
| logger.info(s"[${resp.status.intValue()}] ${ctx.request.method.name} ${ctx.request.uri} took: ${d}ms") | |
| resp | |
| }(innerRejectionsHandled)(ctx) |
| // This is a class that attempts to stop you accessing variables outside a lock. | |
| // | |
| // It does not do a perfect job, but can catch some common kinds of mistake, in | |
| // particular when you accidentally try to work with objects inside closures that | |
| // end up running later, outside the locked region (or in a different thread). | |
| // EXAMPLE | |
| val bank = ThreadBox(object { | |
| val accounts by arrayListOf(10, 0, 0, 0).guard() |
| # E.g. TaskClass = CaseClass('name', 'owner', 'pid') | |
| # task1 = TaskClass(name = "hello", owner = "brian", pid = 15) | |
| # task2 = TaskClass(name = "world", owner = "brian", pid = 13) | |
| # tasks = [task1, task2] | |
| # | |
| # filter(lambda task: task.where(owner = "brian"), tasks) => [task1, task2] | |
| # filter(lambda task: task.where(owner = "brian", pid = 13), tasks) => [task2] | |
| # | |
| # matcher = TaskClass(pid = 13) | |
| # filter(lambda task: task.match(matcher), tasks) => [task2] |
| /* | |
| ** C# style properties in C++ | |
| ** (C) 2010 Arkanosis | |
| ** [email protected] | |
| ** | |
| ** Example code released under the MIT license | |
| ** http://www.opensource.org/licenses/mit-license.php | |
| ** | |
| ** This is an original portable version of | |
| ** http://www.codeproject.com/KB/cpp/properties.aspx |