forked from Markzhaozzz/zipkin_php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
33 lines (29 loc) · 799 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
include 'util.php';
include 'Trace.php';
include 'http.class.php';
if (!function_exists('getallheaders'))
{
function getallheaders()
{
foreach ($_SERVER as $name => $value)
{
if (substr($name, 0, 5) == 'HTTP_')
{
$headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;
}
}
return $headers;
}
}
echo "<pre>";
//var_dump($_SERVER);
//var_dump(getallheaders());exit;
ZKTrace::getInstance()->serverReceive();
usleep(100000);
ZKTrace::getInstance()->clientSend();
var_dump(HTTP::PHPGET('http://branch.zipkin.com/'));
usleep(100000);
ZKTrace::getInstance()->clientReceive();
usleep(100000);
ZKTrace::getInstance()->serverSend();