Expose ProcessTime

This commit is contained in:
斟酌 鵬兄 2022-08-03 15:07:22 +09:00
parent 06635acb72
commit 7dbbfb0342

View File

@ -14,6 +14,11 @@ const FatalError = cl.load( "botanss.errors.FatalError" );
class WebFrame class WebFrame
{ {
get ProcessTime()
{
return process.hrtime.bigint() - this.HTTP.response.raw._hrtime;
}
constructor( Http ) constructor( Http )
{ {
var _self = this; var _self = this;
@ -170,7 +175,7 @@ class WebFrame
this.HTTP.response.headers["Content-Length"] = data.length; this.HTTP.response.headers["Content-Length"] = data.length;
this.HTTP.response.write( data ); this.HTTP.response.write( data );
this.HTTP.response.end(); this.HTTP.response.end();
Dragonfly.Debug( `Result Planted: ${process.hrtime.bigint() - this.HTTP.response.raw._hrtime}ns` ); Dragonfly.Debug( `Result Planted: ${this.ProcessTime}ns` );
} }
__storeCache( data, cache, ttl ) __storeCache( data, cache, ttl )