mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
Debugging
- Added timers to measure performance.
This commit is contained in:
parent
e59e35ae29
commit
50f000988b
4 changed files with 38 additions and 11 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "Context.h"
|
||||
#include "Timer.h"
|
||||
#include "text.h"
|
||||
#include "util.h"
|
||||
#include "main.h"
|
||||
|
@ -80,6 +81,8 @@ void Context::initialize (int argc, char** argv)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Context::initialize ()
|
||||
{
|
||||
Timer t ("Context::initialize");
|
||||
|
||||
// Set up randomness.
|
||||
#ifdef HAVE_SRANDOM
|
||||
srandom (time (NULL));
|
||||
|
@ -129,6 +132,8 @@ void Context::initialize ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Context::run ()
|
||||
{
|
||||
Timer t ("Context::run");
|
||||
|
||||
std::string output;
|
||||
try
|
||||
{
|
||||
|
@ -176,6 +181,8 @@ int Context::run ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Context::dispatch ()
|
||||
{
|
||||
Timer t ("Context::dispatch");
|
||||
|
||||
int gcMod = 0; // Change occurred by way of gc.
|
||||
std::string out;
|
||||
|
||||
|
@ -360,6 +367,8 @@ void Context::parse (
|
|||
Subst& parseSubst,
|
||||
Filter& parseFilter)
|
||||
{
|
||||
Timer t ("Context::parse");
|
||||
|
||||
Att attribute;
|
||||
tagAdditions.clear ();
|
||||
tagRemovals.clear ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue