We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e16ce9a + d055837 commit 1e77bd5Copy full SHA for 1e77bd5
src/Prometheus/Storage/APC.php
@@ -5,13 +5,29 @@
5
namespace Prometheus\Storage;
6
7
use APCUIterator;
8
+use Prometheus\Exception\StorageException;
9
use Prometheus\MetricFamilySamples;
10
use RuntimeException;
11
12
class APC implements Adapter
13
{
14
const PROMETHEUS_PREFIX = 'prom';
15
16
+ /**
17
+ * APC constructor.
18
+ *
19
+ * @throws StorageException
20
+ */
21
+ public function __construct()
22
+ {
23
+ if (!extension_loaded('apcu')) {
24
+ throw new StorageException('APCu extension is not loaded');
25
+ }
26
+ if (!apcu_enabled()) {
27
+ throw new StorageException('APCu is not enabled');
28
29
30
+
31
/**
32
* @return MetricFamilySamples[]
33
*/
0 commit comments