Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
9081392f
Commit
9081392f
authored
Jun 29, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
219e1ced
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
go/xcommon/tracing/cmd/gotrace/testdata/src/a/pkg1/pkg1.go
go/xcommon/tracing/cmd/gotrace/testdata/src/a/pkg1/pkg1.go
+43
-0
go/xcommon/tracing/cmd/gotrace/testdata/src/b/pkg2/pkg2.go
go/xcommon/tracing/cmd/gotrace/testdata/src/b/pkg2/pkg2.go
+12
-0
No files found.
go/xcommon/tracing/cmd/gotrace/testdata/src/a/pkg1/pkg1.go
0 → 100644
View file @
9081392f
package
pkg1
import
(
"net/url"
// extra import which is used in package but should not be used in tracing
"fmt"
)
// probe receives no args
//trace:event traceNewTPre()
// probe receives type this package defines
//trace:event traceNewT(t *T)
type
T
struct
{}
func
NewT
()
*
T
{
traceNewTPre
()
t
:=
&
T
{}
traceNewT
(
t
)
return
t
}
// probe receives type from another package
//trace:event traceURLParsed(u *url.URL)
func
ParseURL
(
ustr
string
)
(
*
url
.
URL
,
error
)
{
u
,
err
:=
url
.
Parse
(
ustr
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"oh my bad: %v"
,
err
)
}
traceURLParsed
(
u
)
return
u
,
nil
}
// probe receives builtin type
//trace:event traceDoSomething(topic string)
func
DoSomething
(
topic
string
)
{
traceDoSomething
(
topic
)
}
go/xcommon/tracing/cmd/gotrace/testdata/src/b/pkg2/pkg2.go
0 → 100644
View file @
9081392f
package
pkg2
import
"a/pkg1"
// TODO should not be needed eventually
//trace:import a/pkg1
//trace:event DoSomething(i, j int, q string)
func
DoSomething
(
i
,
j
int
,
q
string
)
{
traceDoSomething
(
i
,
j
,
q
)
}
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