Synchronous collection of AWR reports using Hyperpacer

Source: Internet
Author: User

I said in the last log.ResourcesThe implementation of the synchronous collection.
Due to the daily use of the mostDatabaseForORACLE, so the Oracle'sAWRReport the idea.
We used to doTestis to execute the start and end of each manually set up a snapshot, and then need this part of the data to get the AWR report to view.
But sometimes it gets hectic, or when a task item is handed over to someone else, there is often a case of forgetting to create a snapshot, which can only be obtained by using Oracle's own default snapshot. But we know that Oracle has a default of one hours to set up a snapshot, and the point at which snapshots are set up is difficult to match with our testing process, so that the reports we get have a lot of distractions.
So, can you useHyperpacerSynchronizing the AWR report is also collected, if it can be integrated into the script, then the acquisition of the AWR report when the use of the snapshot will be able to match our testing process exactly, and also prevent the failure to forget to set up a snapshot of the situation.
A careful study of the JDBC Sampler provided by Hyperpacer found that Hyperpacer was fully capable of this requirement.
So I probably combed a bit of thought:
First of all:
In the initialization scenario: Add the JDBC Sampler and do two operations: one isDBMS_Workload_repository This package provides the Create_Snapshot() Create a snapshot, and then query the current largest snapshot number, which is the snapshot we just created, as the starting snapshot number of the test;
In the closing scenario: Add the JDBC Sampler, set up the same snapshot, and query the current maximum snapshot number as the terminating snapshot number of the test, and add a JDBC sampler to the method provided by package Dbms_workload_repository Awr_report_ HTML Gets an AWR report between two snapshots.

--------------------

The ideal is beautiful, but the actual realization of the discovery is not so simple. It is assumed that in the initialization scenario, the snapshot number of the test start is obtained, and then the JDBC Sampler is passed as a variable to the closing scene. However, the variable is not valid until execution time.
Think for a long time do not know what is the reason, finally suddenly want to understand why, didn't thinkLearningThe use of such a long hyperpacer, and finally in the small-(yin)-(ditch)---(in) overturned the ship.
That gets the initial snapshot number.Sampling DeviceBuilt in the initialization scenario, this also determines the scope of the sampler only in the initialization scenario, I have its output of the variable to the final scene of the sampler, beyond the scope of nature is not recognized.
Khan ~~~~~~~~~~

So adjusted a bit of thought, since can not be perfect, then had to retreat and second, initialize the scene only to create a snapshot, get the snapshot number of the sampler moved to the final scene. And then the final implementation is the following:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/BB/wKioL1cq8DujPmi7AAerm9wxYUg385.jpg "title=" Awr.jpg "alt=" Wkiol1cq8dujpmi7aaerm9wxyug385.jpg "/>

You can see the snapshotBrowserYou have actually taken the awr text, just copy it and save it as an HTML file.

Why do I say it's not perfect? Because, as we said earlier, Oracle will take a snapshot of itself one hours by default, assuming our testing process takes a long time, more than one hours, then when we fetch the largest two snapshot numbers, we actually get the statistics in the red boxes shown.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7F/BD/wKiom1cq733Cnm6wAABt1pwA8Ec130.jpg "title=" Demos.jpg "alt=" Wkiom1cq733cnm6waabt1pwa8ec130.jpg "/>
If we can know in advance how long the test is running, we can also manually modify the extraction of the snapshot numberSQL, but if there is no way to predict the time-consuming test, there is no way to support it.

I really hope that hyperpacer can add a global variable to the configuration of the place, through the variable read and write cross-domain parameter passing.

This article is from the Performance test blog, so be sure to keep this source http://1152313.blog.51cto.com/1142313/1770404

Synchronous collection of AWR reports using Hyperpacer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.