-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move vendor/Joomla to src/Joomla. Update necessary paths.
- Loading branch information
0 parents
commit 4ba523a
Showing
15 changed files
with
1,938 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vendor/ | ||
composer.phar | ||
composer.lock | ||
phpunit.xml |
Large diffs are not rendered by default.
Oops, something went wrong.
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,97 @@ | ||
<?php | ||
/** | ||
* Part of the Joomla Framework Profiler Package | ||
* | ||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE | ||
*/ | ||
|
||
namespace Joomla\Profiler; | ||
|
||
/** | ||
* Implementation of ProfilePointInterface. | ||
* | ||
* @since 1.0 | ||
*/ | ||
class ProfilePoint implements ProfilePointInterface | ||
{ | ||
/** | ||
* The profile point name. | ||
* | ||
* @var string | ||
*/ | ||
protected $name; | ||
|
||
/** | ||
* The elapsed time in seconds since | ||
* the first point in the profiler it belongs to was marked. | ||
* | ||
* @var float | ||
*/ | ||
protected $time; | ||
|
||
/** | ||
* The allocated amount of memory in bytes | ||
* since the first point in the profiler it belongs to was marked. | ||
* | ||
* @var integer | ||
*/ | ||
protected $memoryBytes; | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param string $name The point name. | ||
* @param float $time The time in seconds. | ||
* @param integer $memoryBytes The allocated amount of memory in bytes | ||
*/ | ||
public function __construct($name, $time = 0.0, $memoryBytes = 0) | ||
{ | ||
$this->name = $name; | ||
$this->time = (float) $time; | ||
$this->memoryBytes = (int) $memoryBytes; | ||
} | ||
|
||
/** | ||
* Get the name of this profile point. | ||
* | ||
* @return string The name of this profile point. | ||
*/ | ||
public function getName() | ||
{ | ||
return $this->name; | ||
} | ||
|
||
/** | ||
* Get the elapsed time in seconds since the first | ||
* point in the profiler it belongs to was marked. | ||
* | ||
* @return float The time in seconds. | ||
*/ | ||
public function getTime() | ||
{ | ||
return $this->time; | ||
} | ||
|
||
/** | ||
* Get the allocated amount of memory in bytes | ||
* since the first point in the profiler it belongs to was marked. | ||
* | ||
* @return integer The amount of allocated memory in B. | ||
*/ | ||
public function getMemoryBytes() | ||
{ | ||
return $this->memoryBytes; | ||
} | ||
|
||
/** | ||
* Get the allocated amount of memory in mega bytes | ||
* since the first point in the profiler it belongs to was marked. | ||
* | ||
* @return integer The amount of allocated memory in MB. | ||
*/ | ||
public function getMemoryMegaBytes() | ||
{ | ||
return $this->memoryBytes / 1048576; | ||
} | ||
} |
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,51 @@ | ||
<?php | ||
/** | ||
* Part of the Joomla Framework Profiler Package | ||
* | ||
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE | ||
*/ | ||
|
||
namespace Joomla\Profiler; | ||
|
||
/** | ||
* Interface for profile points. | ||
* A Profile point belongs to a ProfilerInterface and the values | ||
* it holds (time and memory) are relative to the values | ||
* of the first marked point in that profiler. | ||
* | ||
* @since 1.0 | ||
*/ | ||
interface ProfilePointInterface | ||
{ | ||
/** | ||
* Get the name of this profile point. | ||
* | ||
* @return string The name of this profile point. | ||
*/ | ||
public function getName(); | ||
|
||
/** | ||
* Get the elapsed time in seconds since the first | ||
* point in the profiler it belongs to was marked. | ||
* | ||
* @return float The time in seconds. | ||
*/ | ||
public function getTime(); | ||
|
||
/** | ||
* Get the allocated amount of memory in bytes | ||
* since the first point in the profiler it belongs to was marked. | ||
* | ||
* @return integer The amount of allocated memory in B. | ||
*/ | ||
public function getMemoryBytes(); | ||
|
||
/** | ||
* Get the allocated amount of memory in mega bytes | ||
* since the first point in the profiler it belongs to was marked. | ||
* | ||
* @return integer The amount of allocated memory in MB. | ||
*/ | ||
public function getMemoryMegaBytes(); | ||
} |
Oops, something went wrong.