DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • Batch Request Processing With API Gateway
  • Hibernate Get vs. Load
  • Clear Details on Java Collection ‘Clear()’ API
  • Managing Data Residency, the Demo

Pro Tip: Find Out How Long a Web Service Call Takes

Mark O'Neill user avatar by
Mark O'Neill
·
May. 01, 12 · Interview
Like (0)
Save
Tweet
Share
9.21K Views

Join the DZone community and get the full member experience.

Join For Free
Niall Commiskey has written a really useful guide to measuring the time a Gateway takes to call a Web Service. I recommend you check it out if you're interested in this information. One thing I'd add is that Niall is timing how long a Web Service filter takes to run. The Web Service filter may be doing other things, in addition to calling the Web Service (e.g. it may be doing Schema validation on the message). So the timing is showing how long all of these things take, together. If you call an API or Web Service using a "Connect to URL" filter (as explained in this blog post) then all it is doing is making the call.

To add to Niall's information, here are some other ways you can find this information about how long a Web Service call takes:

1) Use Traffic Monitor. This is available by default by pointing a browser to 8090 on the Gateway. It shows in milliseconds how long each processing step at the Gateway takes, including calls to external Web Services or APIs.

2) Use SR . In the example below, I am using the SR tool (which comes with the free SOAPbox download) to call a Google search API over SSL. You can see it tells me the time the request took. If I want to send many requests, I can do that with the -c (count) and -p (parallel threads) parameters.

C:\soapbox\sr>sr -C -h www.google.com -s 443 -u "/search?as_q=vordel" -v GET -V
1.1 -qq
will use HTTPS sessions
remote host = www.google.com
service=443
URI = "/search?as_q=vordel"
verb = "GET"
HTTP client version 1.1
quiet
quiet
2210 ranges from 0 to 3653.903699
add header Connection: close
add header Content-Length: 0
1 threads started
time taken: 0.374000 secs.
bytes sent: 0.000071MB (ju octets)
bytes received: 0.051882MB (ju octets)
transactions: 1
connections: 1
sslConnections: 1
sslSessionsReused: 0
bytes sent/sec: 0.000189MB (197.860963 octets)
bytes received/sec: 0.138721MB (145459.893048 octets)
transactions/sec: 2.673797
protocol/connection errors: 0
transactions by HTTP response code:
code=200, count=1 
Web Service

Published at DZone with permission of Mark O'Neill, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Batch Request Processing With API Gateway
  • Hibernate Get vs. Load
  • Clear Details on Java Collection ‘Clear()’ API
  • Managing Data Residency, the Demo

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: