use of com.newrelic.agent.introspec.DatastoreHelper in project newrelic-java-agent by newrelic.
the class DynamoApiTest method testQueryTable.
@Test
public void testQueryTable() {
putItem();
queryTableTxn();
Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(10000));
String txName = introspector.getTransactionNames().iterator().next();
DatastoreHelper helper = new DatastoreHelper(DYNAMODB_PRODUCT);
helper.assertScopedStatementMetricCount(txName, "query", TABLE_NAME, 1);
helper.assertAggregateMetrics();
helper.assertInstanceLevelMetric(DYNAMODB_PRODUCT, hostName, port);
}
use of com.newrelic.agent.introspec.DatastoreHelper in project newrelic-java-agent by newrelic.
the class DynamoApiTest method testDeleteTable.
@Test
public void testDeleteTable() {
deleteTableTxn();
Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(10000));
String txName = introspector.getTransactionNames().iterator().next();
DatastoreHelper helper = new DatastoreHelper(DYNAMODB_PRODUCT);
helper.assertScopedStatementMetricCount(txName, "deleteTable", TABLE_NAME, 1);
helper.assertInstanceLevelMetric(DYNAMODB_PRODUCT, hostName, port);
}
use of com.newrelic.agent.introspec.DatastoreHelper in project newrelic-java-agent by newrelic.
the class DynamoApiTest method testDescribeTable.
@Test
public void testDescribeTable() {
describeTableTxn();
Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(10000));
String txName = introspector.getTransactionNames().iterator().next();
DatastoreHelper helper = new DatastoreHelper(DYNAMODB_PRODUCT);
helper.assertScopedStatementMetricCount(txName, "describeTable", TABLE_NAME, 1);
helper.assertAggregateMetrics();
helper.assertInstanceLevelMetric(DYNAMODB_PRODUCT, hostName, port);
}
use of com.newrelic.agent.introspec.DatastoreHelper in project newrelic-java-agent by newrelic.
the class DynamoApiTest method testScanTableAsync.
@Test
public void testScanTableAsync() throws ExecutionException, InterruptedException {
putItem();
scanTableTxnAsync();
Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(3000));
String txName = introspector.getTransactionNames().iterator().next();
DatastoreHelper helper = new DatastoreHelper(DYNAMODB_PRODUCT);
helper.assertScopedStatementMetricCount(txName, "scan", "test", 1);
helper.assertAggregateMetrics();
helper.assertInstanceLevelMetric(DYNAMODB_PRODUCT, hostName, port);
}
use of com.newrelic.agent.introspec.DatastoreHelper in project newrelic-java-agent by newrelic.
the class DynamoApiTest method testScanTable.
@Test
public void testScanTable() {
putItem();
scanTableTxn();
Introspector introspector = InstrumentationTestRunner.getIntrospector();
assertEquals(1, introspector.getFinishedTransactionCount(10000));
String txName = introspector.getTransactionNames().iterator().next();
DatastoreHelper helper = new DatastoreHelper(DYNAMODB_PRODUCT);
helper.assertScopedStatementMetricCount(txName, "scan", "test", 1);
helper.assertAggregateMetrics();
helper.assertInstanceLevelMetric(DYNAMODB_PRODUCT, hostName, port);
}
Aggregations