Home Database Mysql Tutorial 在ADF中跟踪SQL执行时间实现代码

在ADF中跟踪SQL执行时间实现代码

Jun 07, 2016 pm 05:56 PM
track

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:SELECT Geos.CREATED_BY, Geos.CREATED_TS, Geos.FAX_NUMBER, Geos.FROM_EMAIL_ADDRESS, Geos.ID, Geos.MODIFIED_BY, Geos.MODIFIED_TS, Geos.NAME, Geos.PHONE_NUMBER, Geos.REPLY_TO_EMAIL_ADDRESS, Geos.IS_DEFAULT FROM GEOS Geos ORDER BY Geos.IS_DEFAULT,Geos.NAME
195:729
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Path tracing and ray tracing for game visual effects Path tracing and ray tracing for game visual effects Feb 19, 2024 am 11:36 AM

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 execution in C# How to use logging to track program execution in C# Oct 09, 2023 pm 03:51 PM

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 food shopping system developed in PHP Implementation method of order status tracking function of food shopping system developed in PHP Nov 02, 2023 pm 02:28 PM

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 PHP debugging tips: How to use the debug_backtrace function to trace the code execution path Jul 29, 2023 am 10:24 AM

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 How to use PHP and Xunsearch for search result tracking and log analysis Aug 05, 2023 pm 07:45 PM

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,

Error tracking and logging using PHP error handling classes Error tracking and logging using PHP error handling classes Aug 08, 2023 pm 02:22 PM

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

Implementation Guide for UniApp to Implement Takeaway Ordering and Delivery Tracking Implementation Guide for UniApp to Implement Takeaway Ordering and Delivery Tracking Jul 04, 2023 am 09:03 AM

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

Methods and techniques for debugging and solving Linux network security issues Methods and techniques for debugging and solving Linux network security issues Jun 30, 2023 pm 11:13 PM

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.

See all articles