<commit_before><?php
namespace AwsSdkZray;

class AwsSdkZray {
    public function onEnter($context, &$storage) {
        // called when we enter the traced_method
    }

    public function onLeave($context, &$storage) {
        $awsService = substr(strrchr(get_class($context['this']), '\\'), 1);
        if (substr($awsService, -6, 6) === 'Client') {
            $awsService = substr($awsService, 0, -6);
        }
        $storage[$awsService][] = [
            $context['functionArgs'][0] => [
                'arguments' => $context['functionArgs'][1],
                'result' => $context['returnValue'],
            ],
        ];
    }
}

// Create new extension - disabled
$zre = new \ZRayExtension('AwsSdkZray');

// set additional data such as logo
$zre->setMetadata(array(
	'logo' => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'logo.png',
));

// start tracing only when 'your_application_initial_method' is called, e.g. 'Mage::run()'
$awsSdkZray = new AwsSdkZray();
$zre->setEnabledAfter('Aws\Common\Aws::factory');

$zre->setEnabledAfter('Aws\CloudFront\CloudFrontClient::factory');
$zre->setEnabledAfter('Aws\CloudHsm\CloudHsmClient::factory');
$zre->setEnabledAfter('Aws\CloudSearch\CloudSearchClient::factory');
$zre->setEnabledAfter('Aws\CloudSearchDomain\CloudSearchDomainClient::factory');
$zre->setEnabledAfter('Aws\CloudWatch\CloudWatchClient::factory');
$zre->setEnabledAfter('Aws\CloudWatchLogs\CloudWatchLogsClient::factory');
$zre->setEnabledAfter('Aws\CognitoIdentity\CognitoIdentityClient::factory');
$zre->setEnabledAfter('Aws\CognitoSync\CognitoSyncClient::factory');
$zre->setEnabledAfter('Aws\ConfigService\ConfigServiceClient::factory');
$zre->setEnabledAfter('Aws\DynamoDb\DynamoDbClient::factory');
$zre->setEnabledAfter('Aws\Ec2\Ec2Client::factory');
$zre->setEnabledAfter('Aws\Ecs\EcsClient::factory');
$zre->setEnabledAfter('Aws\Emr\EmrClient::factory');
$zre->setEnabledAfter('Aws\ElasticTranscoder\ElasticTranscoderClient::factory');<commit_msg>Change name of plugin tab<commit_after><?php
namespace AwsSdkZray;

class AwsSdkZray {
    public function onEnter($context, &$storage) {
        // called when we enter the traced_method
    }

    public function onLeave($context, &$storage) {
        $awsService = substr(strrchr(get_class($context['this']), '\\'), 1);
        if (substr($awsService, -6, 6) === 'Client') {
            $awsService = substr($awsService, 0, -6);
        }
        $storage[$awsService][] = [
            $context['functionArgs'][0] => [
                'arguments' => $context['functionArgs'][1],
                'result' => $context['returnValue'],
            ],
        ];
    }
}

// Create new extension - disabled
$zre = new \ZRayExtension('AWSphpSDK');

// set additional data such as logo
$zre->setMetadata(array(
	'logo' => __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'logo.png',
));

// start tracing only when 'your_application_initial_method' is called, e.g. 'Mage::run()'
$awsSdkZray = new AwsSdkZray();
$zre->setEnabledAfter('Aws\Common\Aws::factory');

$zre->setEnabledAfter('Aws\CloudFront\CloudFrontClient::factory');
$zre->setEnabledAfter('Aws\CloudHsm\CloudHsmClient::factory');
$zre->setEnabledAfter('Aws\CloudSearch\CloudSearchClient::factory');
$zre->setEnabledAfter('Aws\CloudSearchDomain\CloudSearchDomainClient::factory');
$zre->setEnabledAfter('Aws\CloudWatch\CloudWatchClient::factory');
$zre->setEnabledAfter('Aws\CloudWatchLogs\CloudWatchLogsClient::factory');
$zre->setEnabledAfter('Aws\CognitoIdentity\CognitoIdentityClient::factory');
$zre->setEnabledAfter('Aws\CognitoSync\CognitoSyncClient::factory');
$zre->setEnabledAfter('Aws\ConfigService\ConfigServiceClient::factory');
$zre->setEnabledAfter('Aws\DynamoDb\DynamoDbClient::factory');
$zre->setEnabledAfter('Aws\Ec2\Ec2Client::factory');
$zre->setEnabledAfter('Aws\Ecs\EcsClient::factory');
$zre->setEnabledAfter('Aws\Emr\EmrClient::factory');
$zre->setEnabledAfter('Aws\ElasticTranscoder\ElasticTranscoderClient::factory');
{'fraction_non_alphanumeric': 0.17376151356733882, 'fraction_numerical': 0.004480955937266617, 'mean_word_length': 5.153139356814702, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1593321', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1326, 'n_words': 169}