Jiri Simsa | d7616c9 | 2015-03-24 23:44:30 -0700 | [diff] [blame] | 1 | // Copyright 2015 The Vanadium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Jungho Ahn | 8b43cfb | 2014-12-12 09:51:45 -0800 | [diff] [blame] | 5 | // A simple command-line tool to run the benchmark server. |
Robin Thellend | cafaa49 | 2014-06-24 13:58:25 -0700 | [diff] [blame] | 6 | package main |
| 7 | |
| 8 | import ( |
Jiri Simsa | 6ac9522 | 2015-02-23 16:11:49 -0800 | [diff] [blame] | 9 | "v.io/v23" |
Jiri Simsa | 337af23 | 2015-02-27 14:36:46 -0800 | [diff] [blame] | 10 | "v.io/x/lib/vlog" |
Jungho Ahn | cd28b16 | 2015-02-26 17:30:55 -0800 | [diff] [blame] | 11 | |
Jiri Simsa | ffceefa | 2015-02-28 11:03:34 -0800 | [diff] [blame] | 12 | "v.io/x/ref/lib/signals" |
Suharsh Sivakumar | dcc11d7 | 2015-05-11 12:19:20 -0700 | [diff] [blame^] | 13 | _ "v.io/x/ref/runtime/factories/roaming" |
| 14 | "v.io/x/ref/runtime/internal/rpc/benchmark/internal" |
Robin Thellend | cafaa49 | 2014-06-24 13:58:25 -0700 | [diff] [blame] | 15 | ) |
| 16 | |
| 17 | func main() { |
Jiri Simsa | 6ac9522 | 2015-02-23 16:11:49 -0800 | [diff] [blame] | 18 | ctx, shutdown := v23.Init() |
Suharsh Sivakumar | 19fbf99 | 2015-01-23 11:02:27 -0800 | [diff] [blame] | 19 | defer shutdown() |
Suharsh Sivakumar | 946f64d | 2015-01-08 10:48:13 -0800 | [diff] [blame] | 20 | |
Jungho Ahn | 12796e5 | 2015-04-21 09:10:50 -0700 | [diff] [blame] | 21 | ep, stop := internal.StartServer(ctx, v23.GetListenSpec(ctx)) |
| 22 | vlog.Infof("Listening on %s", ep.Name()) |
Robin Thellend | cafaa49 | 2014-06-24 13:58:25 -0700 | [diff] [blame] | 23 | defer stop() |
Suharsh Sivakumar | 946f64d | 2015-01-08 10:48:13 -0800 | [diff] [blame] | 24 | <-signals.ShutdownOnSignals(ctx) |
Robin Thellend | cafaa49 | 2014-06-24 13:58:25 -0700 | [diff] [blame] | 25 | } |