지금 지원 담당자와 채팅
지원 담당자와 채팅

Benchmark Factory for Database 9.0 - User Guide

Welcome to Benchmark Factory What's New in Benchmark Factory Additional Resources Overview of Benchmark Factory Benchmark Factory Components Licensing Getting Started - the Benchmark Factory Workflow Agents Create and Edit Connections Create and Edit Tests and Jobs
Jobs View Pane Job Wizards Quickstart: Create a New Job Edit a Job Industry Standard Benchmark Tests Capture and Replay a Workload Artificial Test for Desired Effect Scalability Tests Custom Tests Create/Delete Benchmark Objects Execute External File Test Options for Create Objects Test Options for Transactions Job Setup Options Use Global Search/Replace Save Job as BMF Script Copy Test to Replay, Mix, Goal, or Scalability Test
Benchmarks How Do I... Settings Test Results and Run Reports BFScripts Repository Troubleshooting The Benchmark Factory REST API Appendix About Us Adding Virtual Users System/Upgrade Requirements/Supported Databases Shortcut Keys

The Benchmark Factory REST API

Getting Started

Benchmark Factory provides a REST API that allows you to access the functionality of Benchmark Factory, but without the need to interact with the Benchmark Factory graphic user interface. REST API is an application program interface (API) that uses HTTP requests to GET, POST, PUT, and DELETE data. Through the REST API, you can use a script, command-line tool, or custom application to automate your load testing tasks using Benchmark Factory.

You can use the Benchmark Factory REST API with the Benchmark Factory console application or BMFServer.exe. BMFServer.exe is a non-UI application included in the Benchmark Factory installation. See BMFServer.exe for more information.

Why Integrate Benchmark Factory

Integrating Benchmark Factory into your continuous testing / continuous improvement process allows you to test the scalability of changes before committing those changes to your production environment. Different Benchmark Factory tests can be used to validate scalability and performance.

  • Use Industry Standard Benchmark tests to test for scalability
  • Use Capture and Replay tests to verify application performance

Base URI Format

To interface with Benchmark Factory using the REST API, use the following URI format:

https://{server}:{port}/api/{resource}

Where {server} is the Benchmark Factory host server, {port} is the port number, and {resource} is the name of the resource.

Example: https://localhost:30100/api/jobs

Console and BMFServer.exe Port Numbers

Use the applicable REST API port number for the Benchmark Factory application you are using.

  • Both the Benchmark Factory Console and BMFServer.exe use port 30100.

HTTP Request Methods

GET - Retrieves a list of resources

POST - Creates a new resource based on the data provided in the request body

PUT - Updates the resource to the value/values provided in the data supplied in the HTTP data area

DELETE - Deletes the resource

Start Benchmark Factory

Benchmark Factory must be running to use the REST API. Start the Benchmark Factory console or BMFServer.exe prior to sending requests via the REST API.

Note: You cannot run the Benchmark Factory console and BMFServer.exe on the same machine at the same time.

Request Authorization

if you want to send request to the Benchmark Factory from external host,you need to add the API Key to the request header

Request and Response Format

Both XML and JSON are supported request and response formats. Specify the response format in the Accept header of the request. Indicate the request format in the Content-Type header of the request.

New Resource Name/Index

When you create a resource, such as a job or connection, the new resource is assigned a zero-based index. This number can be used to identify the resource. However, the index number attached to the resource will change as users remove and add resources. For best results, define a name for the resource and then use the resource name in your requests.

Response Header Content

If a resource (such as a connection or a job) is created, the response header usually contains the URL for the newly-created resource.

Response Codes

These are the expected response codes returned. In addition, some other status codes may be returned if either an internal error occurs or there are other issues.

Code Description
200 Success
201 Success. Resource created.
204 Success. No content returned.
400 The request failed.
401 Unauthorized.
404 The specified resource was not found.
405 The method is not supported for the specified resource.

Job Status Codes

Each job state or status has a code. These are the codes returned when you get the job status. Use these codes to change a job’s status (e.g., start a job, stop a job).

Code Status Action when included in a request
1 Complete Stops a running job.
2 Running Runs a job, if possible.
3 Ready Readies a job to run on schedule. Stops a running job.
4 Hold Prevents a job from running. Stops a running job.
5 Stop Stops a running job.

 

 

Resource Structure and URI Hierarchy

The following represents the object structure for the resources in the Benchmark Factory REST API.

Connections

 Connections

 
 

Connection

Jobs

 Jobs

         
 

Job

       
   

Connection

     
   

Agents

     
     

Agent

   
   

Tests

     
     

Test

   
       

Transactions

 
         

Transaction

   

Schedule

     

TestRuns

 TestRuns

             
 

TestRun

           
   

Connection

         
   

Test

         
   

UserLoadResults

         
     

UserLoadResult

       
       

TransactionResults

     
         

TransactionResult

   
           

SubTransactionResults

 
             

SubTransactionResult

   

NodeResults

         
     

NodeResult

       
   

TestFiles

         
     

TestFile

       
   

Agents

         
     

Agent

       
       

DriverInfos

     
         

DriverInfo

   

Settings

  Settings

         
 

Benchmark

       
   

AS3AP

     
   

ObjectDataRetention

     
   

Replication

     
     

TableStructure

   
       

Columns

 
   

Scalable Hardware

   

Column

   

TPC-B

     
   

TPC-C

     
   

TPC-D

     
   

TPC-E

     
   

TPC-H

     
 

ErrorHandling

       
   

Threshold

     
 

ExecuteFile

       
 

General

       
   

Directories

     
     

Directory

   
   

Retrieval

     
   

TCPIP

     
 

Agent

       
   

UserAgents

     
 

Latency

       
   

InterarrivalTime

     
   

KeyingTime

     
   

ThinkTime

     
 

Oracle

       
   

AWRADDM

     
   

Statspack

     
 

Repository

       
 

Statistics

       
 

Timing

       
   

UserStartup

     
 

Userload

       

 

 

REST API Resources

 

Use the following links to find the Benchmark Factory REST API resource descriptions, as well as additional information to help you get started with the REST API.

  • REST API—This page lists the Benchmark Factory REST API resources, provides resource descriptions, and includes example request and response content.
  • Additional Resources—Find links to blogs and other useful information that will help you get started with the Benchmark Factory REST API.

 

 

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택