Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
106dbc60
Commit
106dbc60
authored
Jul 07, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cff73a85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
go/neo/server/cluster_test.go
go/neo/server/cluster_test.go
+0
-9
go/xcommon/tracing/tracing.go
go/xcommon/tracing/tracing.go
+14
-1
go/xcommon/xtesting/xtesting.go
go/xcommon/xtesting/xtesting.go
+3
-1
No files found.
go/neo/server/cluster_test.go
View file @
106dbc60
...
@@ -141,15 +141,6 @@ func TestMasterStorage(t *testing.T) {
...
@@ -141,15 +141,6 @@ func TestMasterStorage(t *testing.T) {
tracing
.
Unlock
()
tracing
.
Unlock
()
/*
defer func() {
tracing.Lock()
defer tracing.Unlock()
tctx.Done()
}()
*/
// shortcut for addresses
// shortcut for addresses
xaddr
:=
func
(
addr
string
)
*
pipenet
.
Addr
{
xaddr
:=
func
(
addr
string
)
*
pipenet
.
Addr
{
a
,
err
:=
net
.
ParseAddr
(
addr
)
a
,
err
:=
net
.
ParseAddr
(
addr
)
...
...
go/xcommon/tracing/tracing.go
View file @
106dbc60
...
@@ -132,7 +132,20 @@ XXX should tracing provide more tight integration with runtime/pprof.Profile?
...
@@ -132,7 +132,20 @@ XXX should tracing provide more tight integration with runtime/pprof.Profile?
Synchronous tracing
Synchronous tracing
TODO
For testing purposes it is sometimes practical to leverage the property that
probes pause original code execution until the probe run is finished. That
means while the probe is running original goroutine
- is paused at well-defined point (where trace function is called), thus
- it cannot mutate any state it is programmed to mutate.
Using this properties it is possible to attach testing probes and verify that
a set of goroutines in tested code in question
- produce events in correct order, and
- at every event associated internal state is correct.
TODO example
Cross package tracing
Cross package tracing
...
...
go/xcommon/xtesting/xtesting.go
View file @
106dbc60
...
@@ -27,6 +27,8 @@ import (
...
@@ -27,6 +27,8 @@ import (
"testing"
"testing"
)
)
// XXX move -> tracing
// TODO tests for this
// TODO tests for this
// XXX Tracer interface {Trace1} ?
// XXX Tracer interface {Trace1} ?
...
@@ -70,7 +72,7 @@ func (st *SyncTracer) Get1() *SyncTraceMsg {
...
@@ -70,7 +72,7 @@ func (st *SyncTracer) Get1() *SyncTraceMsg {
// XXX naming -> SyncTraceChecker
// TraceChecker synchronously collects and checks tracing events from a SyncTracer
// TraceChecker synchronously collects and checks tracing events from a SyncTracer
type
TraceChecker
struct
{
type
TraceChecker
struct
{
t
*
testing
.
T
t
*
testing
.
T
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment