aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2018-03-23 22:39:35 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2018-03-23 22:39:35 -0700
commit811169d62f5a79a58a218dc992064205032aff83 (patch)
tree6b522d8ba2965377394f56616d381f4d2bf8a2af /tools
parent02879244669f40bef06b38e4b6ad8a320529c924 (diff)
parentcd0723291760ee7221279214ecf15613b71a1ddc (diff)
Merge branch 'master' of github.com:grpc/grpc into authority_header
Diffstat (limited to 'tools')
-rw-r--r--tools/dockerfile/test/cxx_alpine_x64/Dockerfile18
-rw-r--r--tools/internal_ci/linux/grpc_android.cfg19
-rwxr-xr-xtools/internal_ci/linux/grpc_android.sh30
-rw-r--r--tools/interop_matrix/client_matrix.py22
-rwxr-xr-xtools/profiling/latency_profile/profile_analyzer.py21
5 files changed, 90 insertions, 20 deletions
diff --git a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
index 8e5403fdfd..c68a5ddbde 100644
--- a/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
+++ b/tools/dockerfile/test/cxx_alpine_x64/Dockerfile
@@ -39,23 +39,27 @@ RUN apk update && apk add \
# Install Python packages from PyPI
RUN pip install --upgrade pip==9.0.1
RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.0.post1 six==1.10.0
+RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.0.post1 six==1.10.0 twisted==17.5.0
# Google Cloud platform API libraries
RUN pip install --upgrade google-api-python-client
+# Install gflags
+RUN git clone https://github.com/gflags/gflags.git && cd gflags && git checkout v2.2.0
+RUN cd gflags && cmake . && make && make install
+RUN ln -s /usr/local/include/gflags /usr/include/gflags
+
# Prepare ccache
RUN ln -s /usr/bin/ccache /usr/local/bin/gcc
RUN ln -s /usr/bin/ccache /usr/local/bin/g++
-RUN ln -s /usr/bin/ccache /usr/local/bin/cc
+RUN ln -s /usr/bin/ccache /usr/local/bin/cc
RUN ln -s /usr/bin/ccache /usr/local/bin/c++
+RUN ln -s /usr/bin/ccache /usr/local/bin/clang
+RUN ln -s /usr/bin/ccache /usr/local/bin/clang++
-# Install gflags
-RUN git clone https://github.com/gflags/gflags.git && cd gflags && git checkout v2.2.0
-RUN cd gflags && cmake . && make && make install
-RUN ln -s /usr/local/include/gflags /usr/include/gflags
-RUN mkdir -p /var/local/jenkins
+RUN mkdir /var/local/jenkins
+
# Define the default command.
CMD ["bash"]
diff --git a/tools/internal_ci/linux/grpc_android.cfg b/tools/internal_ci/linux/grpc_android.cfg
new file mode 100644
index 0000000000..fb60777a12
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_android.cfg
@@ -0,0 +1,19 @@
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_android.sh"
+timeout_mins: 60
diff --git a/tools/internal_ci/linux/grpc_android.sh b/tools/internal_ci/linux/grpc_android.sh
new file mode 100755
index 0000000000..1417b9686a
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_android.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# Copyright 2018 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+git submodule update --init
+
+# TODO(ericgribkoff) Remove when this commit (already in master) is included in
+# next protobuf release
+cd third_party/protobuf
+git fetch
+git cherry-pick 7daa320065f3bea2b54bf983337d1724f153422d -m 1
+
+cd ../../examples/android/helloworld
+./gradlew build
diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py
index 722cf8aea1..aa45f7fa35 100644
--- a/tools/interop_matrix/client_matrix.py
+++ b/tools/interop_matrix/client_matrix.py
@@ -84,6 +84,9 @@ LANG_RELEASE_MATRIX = {
{
'v1.9.1': None
},
+ {
+ 'v1.10.0': None
+ },
],
'go': [
{
@@ -149,7 +152,7 @@ LANG_RELEASE_MATRIX = {
'v1.9.1': None
},
{
- 'v1.10.0': None
+ 'v1.10.1': None
},
],
'python': [
@@ -180,6 +183,9 @@ LANG_RELEASE_MATRIX = {
{
'v1.9.1': None
},
+ {
+ 'v1.10.0': None
+ },
],
'node': [
{
@@ -209,7 +215,10 @@ LANG_RELEASE_MATRIX = {
},
{
'v1.9.1': None
- }
+ },
+ {
+ 'v1.10.0': None
+ },
],
'ruby': [
{
@@ -244,6 +253,9 @@ LANG_RELEASE_MATRIX = {
{
'v1.9.1': None
},
+ {
+ 'v1.10.0': None
+ },
],
'php': [
{
@@ -273,6 +285,9 @@ LANG_RELEASE_MATRIX = {
{
'v1.9.1': None
},
+ {
+ 'v1.10.0': None
+ },
],
'csharp': [
#{'v1.0.1': None},
@@ -300,6 +315,9 @@ LANG_RELEASE_MATRIX = {
{
'v1.9.1': None
},
+ {
+ 'v1.10.0': None
+ },
],
}
diff --git a/tools/profiling/latency_profile/profile_analyzer.py b/tools/profiling/latency_profile/profile_analyzer.py
index d4d14ef8c7..cdc2f1cbab 100755
--- a/tools/profiling/latency_profile/profile_analyzer.py
+++ b/tools/profiling/latency_profile/profile_analyzer.py
@@ -184,24 +184,23 @@ for cs in call_stacks:
def percentile(N, percent, key=lambda x: x):
"""
- Find the percentile of a list of values.
+ Find the percentile of an already sorted list of values.
- @parameter N - is a list of values. Note N MUST BE already sorted.
- @parameter percent - a float value from 0.0 to 1.0.
+ @parameter N - is a list of values. MUST be already sorted.
+ @parameter percent - a float value from [0.0,1.0].
@parameter key - optional key function to compute value from each element of N.
@return - the percentile of the values
"""
if not N:
return None
- k = (len(N) - 1) * percent
- f = math.floor(k)
- c = math.ceil(k)
- if f == c:
- return key(N[int(k)])
- d0 = key(N[int(f)]) * (c - k)
- d1 = key(N[int(c)]) * (k - f)
- return d0 + d1
+ float_idx = (len(N) - 1) * percent
+ idx = int(float_idx)
+ result = key(N[idx])
+ if idx < len(N) - 1:
+ # interpolate with the next element's value
+ result += (float_idx - idx) * (key(N[idx + 1]) - key(N[idx]))
+ return result
def tidy_tag(tag):