-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #978 from newrelic/dev
Release 11.3
- Loading branch information
Showing
31 changed files
with
781 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
11.2.0 | ||
11.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "php_memcached.h" | ||
#include "nr_datastore_instance.h" | ||
#include "php_agent.h" | ||
|
||
nr_datastore_instance_t* nr_php_memcached_create_datastore_instance( | ||
const char* host_or_socket, | ||
zend_long port) { | ||
nr_datastore_instance_t* instance = NULL; | ||
if (port == 0) { // local socket | ||
instance = nr_datastore_instance_create("localhost", host_or_socket, NULL); | ||
} else { | ||
char* port_str = nr_formatf("%ld", (long)port); | ||
instance = nr_datastore_instance_create(host_or_socket, port_str, NULL); | ||
nr_free(port_str); | ||
} | ||
return instance; | ||
} | ||
|
||
void nr_php_memcached_create_instance_metric( | ||
const char* host_or_socket, | ||
zend_long port) { | ||
nr_datastore_instance_t* instance | ||
= nr_php_memcached_create_datastore_instance(host_or_socket, port); | ||
char* instance_metric = nr_formatf("Datastore/instance/Memcached/%s/%s", | ||
instance->host, instance->port_path_or_id); | ||
nrm_force_add(NRPRG(txn)->unscoped_metrics, instance_metric, 0); | ||
nr_datastore_instance_destroy(&instance); | ||
nr_free(instance_metric); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2020 New Relic Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef PHP_MEMCACHED_HDR | ||
#define PHP_MEMCACHED_HDR | ||
|
||
#include "nr_datastore_instance.h" | ||
#include "php_includes.h" | ||
|
||
/* | ||
* Purpose : Create a datastore instance metadata for a Memcached server. | ||
* | ||
* Params : 1. The memcached host or socket name as given to Memcached::addServer(). | ||
* 2. The memcached port as given as given to Memcached::addServer(). | ||
* | ||
* Returns: nr_datastore_instance_t* that the caller is responsible for freeing | ||
*/ | ||
nr_datastore_instance_t* nr_php_memcached_create_datastore_instance( | ||
const char* host_or_socket, | ||
zend_long port); | ||
|
||
/* | ||
* Purpose : Create a memcached instance metric | ||
* | ||
* Params : 1. The memcached host or socket name as given to Memcached::addServer(). | ||
* 2. The memcached port as given as given to Memcached::addServer(). | ||
*/ | ||
extern void nr_php_memcached_create_instance_metric( | ||
const char* host_or_socket, | ||
zend_long port); | ||
|
||
|
||
#endif |
Oops, something went wrong.