Skip to content

ServiceWeaver/weaver

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

* fix: weavelet cpu consumption

after to run the hello example with `go run .` the cpu consumption was
at 100%, this change adds a blocking feature to `getcomponentstostart`
in `singleprocess.go`, this prevents the excessive cpu consumption

```
(pprof) top
showing nodes accounting for 29.98s, 100% of 29.99s total
dropped 7 nodes (cum <= 0.15s)
      flat  flat%   sum%        cum   cum%
    15.66s 52.22% 52.22%     29.98s   100%  github.com/serviceweaver/weaver.(*weavelet).watchcomponentstostart
     9.71s 32.38% 84.59%     11.14s 37.15%  github.com/serviceweaver/weaver/runtime/retry.(*retry).continue
     3.18s 10.60% 95.20%      3.18s 10.60%  github.com/serviceweaver/weaver.(*singleprocessenv).getcomponentstostart
     1.43s  4.77%   100%      1.43s  4.77%  context.(*emptyctx).err
         0     0%   100%     29.98s   100%  github.com/serviceweaver/weaver.startwork.func1
```

* Update singleprocess.go

Co-authored-by: Daniel Nephin <dnephin@gmail.com>

* Update singleprocess.go

Co-authored-by: Daniel Nephin <dnephin@gmail.com>

---------

Co-authored-by: Srdjan Petrovic <spetrovic@google.com>
Co-authored-by: Daniel Nephin <dnephin@gmail.com>
Co-authored-by: Robert Grandl <rgrandl@users.noreply.github.com>
35727ae

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
dev
February 28, 2023 13:25
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32
February 6, 2023 10:32

Go Reference

Service Weaver

Service Weaver is a programming framework for writing, deploying, and managing distributed applications. You can run, test, and debug a Service Weaver application locally on your machine, and then deploy it to the cloud with a single command.

$ go run .                      # Run locally.
$ weaver gke deploy weaver.toml # Run in the cloud.

Visit https://serviceweaver.dev to learn more about Service Weaver.

Installation and Getting Started

Visit https://serviceweaver.dev/docs.html for installation instructions and information on getting started.

Contributing

Please read our contribution guide for details on how to contribute.