Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
* Update CSS to work with many styles but can keep profiler bar itself the same.
* Add test style with many CSS frameworks.
  • Loading branch information
ve3 committed May 25, 2019
1 parent 86ba865 commit b69198a
Show file tree
Hide file tree
Showing 11 changed files with 420 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Rundiz/Profiler/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* This class works as logger things for profiling.
*
* @package Rundiz\Profiler
* @version 1.1.1
* @version 1.1.2
* @author Vee W.
* @access protected Do not access to this class directly by using new \Rundiz\Profiler\Console. Please access this class via Profiler class instead. See $Profiler->Console.
*/
Expand Down
2 changes: 1 addition & 1 deletion Rundiz/Profiler/views/display.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<div class="rdprofiler">
<div class="rdprofiler-container">
<ul class="rdprofiler-log-sections">
<li><strong><a href="http://rundiz.com" target="vendor" class="highlight">Rundiz</a></strong>\Profiler</li>
<li><strong><a href="http://rundiz.com" target="vendor" class="rdprofiler-highlight">Rundiz</a></strong>\Profiler</li>
<?php
include 'display-PHP.php';
if (is_array($this->log_sections)) {
Expand Down
51 changes: 49 additions & 2 deletions Rundiz/Profiler/views/rdprofiler.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,52 @@ body {


.rdprofiler {
background: #eee;
background-color: #eee;
background-image: none;
border: none;
border-top: 1px solid #bbb;
border-image: none;
box-shadow: 0 -1px rgba(255,255,255,0.2);
bottom: 0;
clear: both;
color: #333;
cursor: default;
display: block;
font-family: Verdana, Tahoma, sans-serif, system-ui;
font-size: 11px;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 30px;
left: 0;
letter-spacing: normal;
margin: 0;
max-height: none;
max-width: none;
min-height: 0;
min-width: 0;
opacity: 1;
outline: none;
padding: 0;
position: fixed;
text-align: left;
text-decoration: none;
text-indent: 0;
text-transform: none;
transform: none;
transition: none;
visibility: visible;
white-space: normal;
width: 100%;
word-break: break-word;
word-spacing: normal;
word-wrap: break-word;
z-index: 100;
}
.rdprofiler a {
color: inherit;
}
.rdprofiler a.highlight {
.rdprofiler a.rdprofiler-highlight {
color: #896139;
text-decoration: none;
}
Expand Down Expand Up @@ -92,13 +118,34 @@ body {
}


ul.rdprofiler-log-sections,
.rdprofiler-log-sections {
background: inherit;
background-color: inherit;
background-image: inherit;
border: inherit;
border-image: inherit;
color: inherit;
display: table;
font-family: inherit;
font-size: inherit;
font-style: inherit;
font-variant: inherit;
font-weight: inherit;
letter-spacing: inherit;
line-height: 30px;
list-style: none;
margin: 0;
padding: 0;
text-align: inherit;
text-decoration: inherit;
text-indent: inherit;
text-transform: inherit;
vertical-align: middle;
white-space: inherit;
word-break: inherit;
word-spacing: inherit;
word-wrap: inherit;
}
.rdprofiler-log-sections > li {
border: none;
Expand Down
12 changes: 12 additions & 0 deletions tests/via-http/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,17 @@
<small class="help">Please open this file at <?php echo realpath('test-full.php'); ?> and follow instruction in the file before go to &quot;Full Test&quot;.</small>
</li>
</ul>

<h2 style="margin-top: 40px;">Test with CSS frameworks</h2>
<p>Based on basic test but different styles.</p>
<ul>
<li><a href="styles/basic-bootstrap3.php">Bootstrap 3</a></li>
<li><a href="styles/basic-bootstrap4.php">Bootstrap 4</a></li>
<li><a href="styles/basic-foundation5.php">Foundation 5</a></li>
<li><a href="styles/basic-foundation6.php">Foundation 6</a></li>
<li><a href="styles/basic-skeleton1.php">Skeleton 1</a></li>
<li><a href="styles/basic-bulma0.php">Bulma 0</a></li>
<li><a href="styles/basic-pure1.php">Pure 1</a></li>
</ul>
</body>
</html>
51 changes: 51 additions & 0 deletions tests/via-http/styles/basic-bootstrap3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

// require the class files. you may no need these if you install via composer.
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/ProfilerBase.php';
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/Profiler.php';

$profiler = new \Rundiz\Profiler\Profiler();
$profiler->Console->registerLogSections(['Logs', 'Time Load', 'Memory Usage', 'Files']);

// -----------------------------------------------------------------------------------------------------
// lazy to write same test on every page, use common test functions
// you can change this to other coding style in your real project.
require dirname(__DIR__).'/common-test-functions.php';

// css doc https://getbootstrap.com/docs/3.3/getting-started/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rundiz\Profiler test</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<h1>Rundiz\Profiler test</h1>
<p>This page test followings:</p>
<ul>
<li>Log</li>
<li>Time Load</li>
<li>Memory usage</li>
<li>Files</li>
</ul>

<?php
rdpBasicLogs($profiler);
rdpTimeLoadLogs($profiler);
rdpMemoryUsage($profiler);

$profiler->gatherAll();

// just checking.
echo '<pre class="profiler-data-dump-test">'.htmlspecialchars(print_r($profiler->dumptest(), true)).'</pre>';
echo "\n\n\n";

// display profiler window.
echo $profiler->display();
?>
</body>
</html>
51 changes: 51 additions & 0 deletions tests/via-http/styles/basic-bootstrap4.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

// require the class files. you may no need these if you install via composer.
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/ProfilerBase.php';
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/Profiler.php';

$profiler = new \Rundiz\Profiler\Profiler();
$profiler->Console->registerLogSections(['Logs', 'Time Load', 'Memory Usage', 'Files']);

// -----------------------------------------------------------------------------------------------------
// lazy to write same test on every page, use common test functions
// you can change this to other coding style in your real project.
require dirname(__DIR__).'/common-test-functions.php';

// css doc https://getbootstrap.com/docs/4.0/getting-started/introduction/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rundiz\Profiler test</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
</head>
<body>
<h1>Rundiz\Profiler test</h1>
<p>This page test followings:</p>
<ul>
<li>Log</li>
<li>Time Load</li>
<li>Memory usage</li>
<li>Files</li>
</ul>

<?php
rdpBasicLogs($profiler);
rdpTimeLoadLogs($profiler);
rdpMemoryUsage($profiler);

$profiler->gatherAll();

// just checking.
echo '<pre class="profiler-data-dump-test">'.htmlspecialchars(print_r($profiler->dumptest(), true)).'</pre>';
echo "\n\n\n";

// display profiler window.
echo $profiler->display();
?>
</body>
</html>
51 changes: 51 additions & 0 deletions tests/via-http/styles/basic-bulma0.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

// require the class files. you may no need these if you install via composer.
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/ProfilerBase.php';
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/Profiler.php';

$profiler = new \Rundiz\Profiler\Profiler();
$profiler->Console->registerLogSections(['Logs', 'Time Load', 'Memory Usage', 'Files']);

// -----------------------------------------------------------------------------------------------------
// lazy to write same test on every page, use common test functions
// you can change this to other coding style in your real project.
require dirname(__DIR__).'/common-test-functions.php';

// css doc https://cdnjs.com/libraries/bulma
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rundiz\Profiler test</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css" integrity="sha256-vK3UTo/8wHbaUn+dTQD0X6dzidqc5l7gczvH+Bnowwk=" crossorigin="anonymous" />
</head>
<body>
<h1>Rundiz\Profiler test</h1>
<p>This page test followings:</p>
<ul>
<li>Log</li>
<li>Time Load</li>
<li>Memory usage</li>
<li>Files</li>
</ul>

<?php
rdpBasicLogs($profiler);
rdpTimeLoadLogs($profiler);
rdpMemoryUsage($profiler);

$profiler->gatherAll();

// just checking.
echo '<pre class="profiler-data-dump-test">'.htmlspecialchars(print_r($profiler->dumptest(), true)).'</pre>';
echo "\n\n\n";

// display profiler window.
echo $profiler->display();
?>
</body>
</html>
51 changes: 51 additions & 0 deletions tests/via-http/styles/basic-foundation5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

// require the class files. you may no need these if you install via composer.
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/ProfilerBase.php';
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/Profiler.php';

$profiler = new \Rundiz\Profiler\Profiler();
$profiler->Console->registerLogSections(['Logs', 'Time Load', 'Memory Usage', 'Files']);

// -----------------------------------------------------------------------------------------------------
// lazy to write same test on every page, use common test functions
// you can change this to other coding style in your real project.
require dirname(__DIR__).'/common-test-functions.php';

// css doc https://cdnjs.com/libraries/foundation/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rundiz\Profiler test</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/5.5.3/css/foundation.min.css" integrity="sha256-NTds7atVCDeolLUzbcl45lx4gJYO+hNXCaX1wC2HQHc=" crossorigin="anonymous" />
</head>
<body>
<h1>Rundiz\Profiler test</h1>
<p>This page test followings:</p>
<ul>
<li>Log</li>
<li>Time Load</li>
<li>Memory usage</li>
<li>Files</li>
</ul>

<?php
rdpBasicLogs($profiler);
rdpTimeLoadLogs($profiler);
rdpMemoryUsage($profiler);

$profiler->gatherAll();

// just checking.
echo '<pre class="profiler-data-dump-test">'.htmlspecialchars(print_r($profiler->dumptest(), true)).'</pre>';
echo "\n\n\n";

// display profiler window.
echo $profiler->display();
?>
</body>
</html>
51 changes: 51 additions & 0 deletions tests/via-http/styles/basic-foundation6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

// require the class files. you may no need these if you install via composer.
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/ProfilerBase.php';
require dirname(dirname(dirname(__DIR__))).'/Rundiz/Profiler/Profiler.php';

$profiler = new \Rundiz\Profiler\Profiler();
$profiler->Console->registerLogSections(['Logs', 'Time Load', 'Memory Usage', 'Files']);

// -----------------------------------------------------------------------------------------------------
// lazy to write same test on every page, use common test functions
// you can change this to other coding style in your real project.
require dirname(__DIR__).'/common-test-functions.php';

// css doc https://cdnjs.com/libraries/foundation/
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rundiz\Profiler test</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.5.3/css/foundation.min.css" integrity="sha256-xpOKVlYXzQ3P03j397+jWFZLMBXLES3IiryeClgU5og=" crossorigin="anonymous" />
</head>
<body>
<h1>Rundiz\Profiler test</h1>
<p>This page test followings:</p>
<ul>
<li>Log</li>
<li>Time Load</li>
<li>Memory usage</li>
<li>Files</li>
</ul>

<?php
rdpBasicLogs($profiler);
rdpTimeLoadLogs($profiler);
rdpMemoryUsage($profiler);

$profiler->gatherAll();

// just checking.
echo '<pre class="profiler-data-dump-test">'.htmlspecialchars(print_r($profiler->dumptest(), true)).'</pre>';
echo "\n\n\n";

// display profiler window.
echo $profiler->display();
?>
</body>
</html>
Loading

0 comments on commit b69198a

Please sign in to comment.