Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions doc/profiling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to do profiling

## Build with profiling enabled
Either edit src/Makefile.default or start make like this:
```
PROFILING=1 make -f Makefile.yourOS
```

## Advice
neucoin uses a lot of CPU (mostly scrypt) while reading the block database
during startup. This might bias the tests you are doing, so it is best
to first collect profiling data of a startup sequence and copy this
away to not be overwritten. Then start neucoin again and actually do
your test. Later you can use the data from the startup sequence to
calibrate your test data.
8 changes: 8 additions & 0 deletions src/Makefile.default
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PROFILING ?= 0

CONSTANTS ?= constants.cpp

BOOST_SUFFIX ?= #NO SUFFIX
Expand All @@ -18,6 +20,12 @@ ifeq ($(USE_UPNP),1)
LIBRARIES_QT += miniupnpc
endif

ifeq ($(PROFILING),1)
CXXFLAGS += -g -pg
LDFLAGS_HEADLESS += -g -pg
LDFLAGS_QT += -g -pg
endif

SOURCES_COMMON = \
$(CONSTANTS) \
CheckClientSanity.cpp \
Expand Down