在ADF中跟踪SQL执行时间实现代码
ADF是oracle提供的一套企业开发的解决方案,本文将实现在ADF中跟踪SQL执行时间
ADF是oracle提供的一套企业开发的解决方案。最近做性能测试, 需要获取当前页面有多少SQL 查询,花费多少时间。首先想到的就是常用的log4jdbc 结果 ADF 不支持封装的驱动。后尝试在Orace DB 层面上拦截,比较复杂还要设置数据库连接的sesson属性,也要修改以后代码。
ADF 的ViewObjectImp 提供复写SQL调用的方法,但需要修改已有代码,最后还是修改ADF源码来达到不修改已有代码而获取到SQL执行时间。
先用改好的adfm.jar 覆盖已有的, 配置虚拟机启动参数 -DSQLTruckerToFile=D:\log.txt -DenableSQLTracker=true
重启就可以看到SQL 执行时间了
195:
195:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The decision to use path tracing or ray tracing is a critical choice for game developers. Although they both perform well visually, there are some differences in practical applications. Therefore, game enthusiasts need to carefully weigh the advantages and disadvantages of both to determine which technology is more suitable for achieving the visual effects they want. What is ray tracing? Ray tracing is a complex rendering technique used to simulate the propagation and interaction of light in virtual environments. Unlike traditional rasterization methods, ray tracing generates realistic lighting and shadow effects by tracing the path of light, providing a more realistic visual experience. This technology not only produces more realistic images, but also simulates more complex lighting effects, making scenes look more realistic and vivid. its main concepts

How to use logging to track program operation in C# requires specific code examples. Introduction: When developing software, it is often necessary to track and record the operation of the program so that the problem can be accurately found when a problem occurs. Logging is an important technical means that can record the running status, error information and debugging information of the program to facilitate abnormal location and troubleshooting. This article will introduce how to use logging to track the operation of the program in C#, and provide specific code examples. 1. Selection of logging libraries In C#, there are many excellent ones

Implementation method of order status tracking function of vegetable shopping system developed in PHP With the rapid development of e-commerce, more and more people begin to purchase daily necessities online, including daily ingredients and vegetables. In order to facilitate users to purchase vegetables, many vegetable shopping systems have begun to emerge, providing users with online purchase, payment and delivery services. In the grocery shopping system, the order status tracking function is particularly important, allowing users to understand the status of their orders in real time, thereby improving the user's shopping experience. This article will introduce the implementation of the order status tracking function of the grocery shopping system developed in PHP.

PHP debugging tips: How to use the debug_backtrace function to trace the code execution path Introduction: During the development process, you often encounter situations where you need to trace the code execution path in order to find out where the error is. PHP provides a very useful function debug_backtrace, which can be used to obtain stack information of function calls, thereby helping us track down errors. This article will introduce the usage of debug_backtrace function and provide some usage examples. 1. debug_back

How to use PHP and Xunsearch for search result tracking and log analysis. With the rapid development of the Internet, search engines have become an indispensable part of our daily lives. Whether it is shopping, academic research or entertainment consulting, search engines can help us get the information we need. For search engine developers, it is very important to understand users' search behavior and analyze the quality of search results. This article will introduce how to use PHP and Xunsearch for search result tracking and log analysis. first,

Using PHP error handling classes for error tracking and recording error handling is a very important part of the development process and can help us track and solve bugs in the program. In PHP, we can use built-in error handling functions and custom error handling classes to handle errors that occur during program running. This article will introduce how to use PHP error handling classes for error tracking and logging. We first need to create a custom error handling class. Error handling classes can inherit from PHP's built-in errors

Introduction to UniApp’s Guide to Implementing Takeout Ordering and Delivery Tracking: With the rapid development of the takeout market, more and more people choose to order takeout and deliver it through mobile APPs, which brings more business opportunities and challenges to the catering industry. . As a cross-platform development framework, UniApp can develop multi-platform applications quickly and efficiently. This article will introduce how to use UniApp to implement takeout ordering and delivery tracking functions, and attach relevant code examples. 1. Requirements analysis User login: Users need to pass their mobile phone number or

How to debug and solve network security problems in Linux systems. With the rapid development of the Internet, network security has become an increasingly important topic. As one of the most popular operating systems, Linux systems have certain advantages in network security. However, even Linux systems are not completely immune to cyberattacks. Therefore, it is crucial to know how to debug and resolve network security issues in Linux systems. This article will cover some common network security issues and provide some suggestions and tips for debugging and resolving them.
