mirror of https://github.com/grpc/grpc.git
Merge pull request #4035 from sreecha/stress_tests_metrics
Add more config options to stress tests and export metricspull/4174/head
commit
e779084520
14 changed files with 836 additions and 41 deletions
@ -0,0 +1,102 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
*is % allowed in string |
||||
*/ |
||||
|
||||
#include <memory> |
||||
#include <string> |
||||
|
||||
#include <gflags/gflags.h> |
||||
#include <grpc++/grpc++.h> |
||||
|
||||
#include "test/cpp/util/metrics_server.h" |
||||
#include "test/cpp/util/test_config.h" |
||||
#include "test/proto/metrics.grpc.pb.h" |
||||
#include "test/proto/metrics.pb.h" |
||||
|
||||
DEFINE_string(metrics_server_address, "", |
||||
"The metrics server addresses in the fomrat <hostname>:<port>"); |
||||
|
||||
using grpc::testing::EmptyMessage; |
||||
using grpc::testing::GaugeResponse; |
||||
using grpc::testing::MetricsService; |
||||
using grpc::testing::MetricsServiceImpl; |
||||
|
||||
void PrintMetrics(grpc::string& server_address) { |
||||
gpr_log(GPR_INFO, "creating a channel to %s", server_address.c_str()); |
||||
std::shared_ptr<grpc::Channel> channel( |
||||
grpc::CreateChannel(server_address, grpc::InsecureChannelCredentials())); |
||||
|
||||
std::unique_ptr<MetricsService::Stub> stub(MetricsService::NewStub(channel)); |
||||
|
||||
grpc::ClientContext context; |
||||
EmptyMessage message; |
||||
|
||||
std::unique_ptr<grpc::ClientReader<GaugeResponse>> reader( |
||||
stub->GetAllGauges(&context, message)); |
||||
|
||||
GaugeResponse gauge_response; |
||||
long overall_qps = 0; |
||||
int idx = 0; |
||||
while (reader->Read(&gauge_response)) { |
||||
if (gauge_response.value_case() == GaugeResponse::kLongValue) { |
||||
gpr_log(GPR_INFO, "Gauge: %d (%s: %ld)", ++idx, |
||||
gauge_response.name().c_str(), gauge_response.long_value()); |
||||
overall_qps += gauge_response.long_value(); |
||||
} else { |
||||
gpr_log(GPR_INFO, "Gauge %s is not a long value", gauge_response.name().c_str()); |
||||
} |
||||
} |
||||
|
||||
gpr_log(GPR_INFO, "OVERALL: %ld", overall_qps); |
||||
|
||||
const grpc::Status status = reader->Finish(); |
||||
if (!status.ok()) { |
||||
gpr_log(GPR_ERROR, "Error in getting metrics from the client"); |
||||
} |
||||
} |
||||
|
||||
int main(int argc, char** argv) { |
||||
grpc::testing::InitTest(&argc, &argv, true); |
||||
|
||||
// Make sure server_addresses flag is not empty
|
||||
if (FLAGS_metrics_server_address.empty()) { |
||||
gpr_log( |
||||
GPR_ERROR, |
||||
"Cannot connect to the Metrics server. Please pass the address of the" |
||||
"metrics server to connect to via the 'metrics_server_address' flag"); |
||||
return 1; |
||||
} |
||||
|
||||
PrintMetrics(FLAGS_metrics_server_address); |
||||
|
||||
return 0; |
||||
} |
@ -0,0 +1,119 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
*is % allowed in string |
||||
*/ |
||||
|
||||
#include "test/cpp/util/metrics_server.h" |
||||
|
||||
#include <grpc++/server_builder.h> |
||||
|
||||
#include "test/proto/metrics.grpc.pb.h" |
||||
#include "test/proto/metrics.pb.h" |
||||
|
||||
namespace grpc { |
||||
namespace testing { |
||||
|
||||
Gauge::Gauge(long initial_val) : val_(initial_val) {} |
||||
|
||||
void Gauge::Set(long new_val) { |
||||
std::lock_guard<std::mutex> lock(val_mu_); |
||||
val_ = new_val; |
||||
} |
||||
|
||||
long Gauge::Get() { |
||||
std::lock_guard<std::mutex> lock(val_mu_); |
||||
return val_; |
||||
} |
||||
|
||||
grpc::Status MetricsServiceImpl::GetAllGauges( |
||||
ServerContext* context, const EmptyMessage* request, |
||||
ServerWriter<GaugeResponse>* writer) { |
||||
gpr_log(GPR_INFO, "GetAllGauges called"); |
||||
|
||||
std::lock_guard<std::mutex> lock(mu_); |
||||
for (auto it = gauges_.begin(); it != gauges_.end(); it++) { |
||||
GaugeResponse resp; |
||||
resp.set_name(it->first); // Gauge name
|
||||
resp.set_long_value(it->second->Get()); // Gauge value
|
||||
writer->Write(resp); |
||||
} |
||||
|
||||
return Status::OK; |
||||
} |
||||
|
||||
grpc::Status MetricsServiceImpl::GetGauge(ServerContext* context, |
||||
const GaugeRequest* request, |
||||
GaugeResponse* response) { |
||||
std::lock_guard<std::mutex> lock(mu_); |
||||
|
||||
const auto it = gauges_.find(request->name()); |
||||
if (it != gauges_.end()) { |
||||
response->set_name(it->first); |
||||
response->set_long_value(it->second->Get()); |
||||
} |
||||
|
||||
return Status::OK; |
||||
} |
||||
|
||||
std::shared_ptr<Gauge> MetricsServiceImpl::CreateGauge(const grpc::string& name, |
||||
bool* already_present) { |
||||
std::lock_guard<std::mutex> lock(mu_); |
||||
|
||||
std::shared_ptr<Gauge> gauge(new Gauge(0)); |
||||
const auto p = gauges_.emplace(name, gauge); |
||||
|
||||
// p.first is an iterator pointing to <name, shared_ptr<Gauge>> pair. p.second
|
||||
// is a boolean which is set to 'true' if the Gauge is inserted in the guages_
|
||||
// map and 'false' if it is already present in the map
|
||||
*already_present = !p.second; |
||||
return p.first->second; |
||||
} |
||||
|
||||
// Starts the metrics server and returns the grpc::Server instance. Call Wait()
|
||||
// on the returned server instance.
|
||||
std::unique_ptr<grpc::Server> MetricsServiceImpl::StartServer(int port) { |
||||
gpr_log(GPR_INFO, "Building metrics server.."); |
||||
|
||||
const grpc::string address = "0.0.0.0:" + std::to_string(port); |
||||
|
||||
ServerBuilder builder; |
||||
builder.AddListeningPort(address, grpc::InsecureServerCredentials()); |
||||
builder.RegisterService(this); |
||||
|
||||
std::unique_ptr<grpc::Server> server(builder.BuildAndStart()); |
||||
gpr_log(GPR_INFO, "Metrics server %s started. Ready to receive requests..", |
||||
address.c_str()); |
||||
|
||||
return server; |
||||
} |
||||
|
||||
} // namespace testing
|
||||
} // namespace grpc
|
@ -0,0 +1,100 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
*is % allowed in string |
||||
*/ |
||||
#ifndef GRPC_TEST_CPP_METRICS_SERVER_H |
||||
#define GRPC_TEST_CPP_METRICS_SERVER_H |
||||
|
||||
#include <map> |
||||
#include <mutex> |
||||
|
||||
#include "test/proto/metrics.grpc.pb.h" |
||||
#include "test/proto/metrics.pb.h" |
||||
|
||||
/*
|
||||
* This implements a Metrics server defined in test/proto/metrics.proto. Any |
||||
* test service can use this to export Metrics (TODO (sreek): Only Gauges for |
||||
* now). |
||||
* |
||||
* Example: |
||||
* MetricsServiceImpl metricsImpl; |
||||
* .. |
||||
* // Create Gauge(s). Note: Gauges can be created even after calling
|
||||
* // 'StartServer'.
|
||||
* Gauge gauge1 = metricsImpl.CreateGauge("foo",is_present); |
||||
* // gauge1 can now be used anywhere in the program to set values.
|
||||
* ... |
||||
* // Create the metrics server
|
||||
* std::unique_ptr<grpc::Server> server = metricsImpl.StartServer(port); |
||||
* server->Wait(); // Note: This is blocking.
|
||||
*/ |
||||
namespace grpc { |
||||
namespace testing { |
||||
|
||||
// TODO(sreek): Add support for other types of Gauges like Double, String in
|
||||
// future
|
||||
class Gauge { |
||||
public: |
||||
Gauge(long initial_val); |
||||
void Set(long new_val); |
||||
long Get(); |
||||
|
||||
private: |
||||
long val_; |
||||
std::mutex val_mu_; |
||||
}; |
||||
|
||||
class MetricsServiceImpl GRPC_FINAL : public MetricsService::Service { |
||||
public: |
||||
grpc::Status GetAllGauges(ServerContext* context, const EmptyMessage* request, |
||||
ServerWriter<GaugeResponse>* writer) GRPC_OVERRIDE; |
||||
|
||||
grpc::Status GetGauge(ServerContext* context, const GaugeRequest* request, |
||||
GaugeResponse* response) GRPC_OVERRIDE; |
||||
|
||||
// Create a Gauge with name 'name'. is_present is set to true if the Gauge
|
||||
// is already present in the map.
|
||||
// NOTE: CreateGauge can be called anytime (i.e before or after calling
|
||||
// StartServer).
|
||||
std::shared_ptr<Gauge> CreateGauge(const grpc::string& name, |
||||
bool* already_present); |
||||
|
||||
std::unique_ptr<grpc::Server> StartServer(int port); |
||||
|
||||
private: |
||||
std::map<string, std::shared_ptr<Gauge>> gauges_; |
||||
std::mutex mu_; |
||||
}; |
||||
|
||||
} // namespace testing
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPC_TEST_CPP_METRICS_SERVER_H
|
@ -0,0 +1,55 @@ |
||||
|
||||
// Copyright 2015, Google Inc. |
||||
// All rights reserved. |
||||
// |
||||
// Redistribution and use in source and binary forms, with or without |
||||
// modification, are permitted provided that the following conditions are |
||||
// met: |
||||
// |
||||
// * Redistributions of source code must retain the above copyright |
||||
// notice, this list of conditions and the following disclaimer. |
||||
// * Redistributions in binary form must reproduce the above |
||||
// copyright notice, this list of conditions and the following disclaimer |
||||
// in the documentation and/or other materials provided with the |
||||
// distribution. |
||||
// * Neither the name of Google Inc. nor the names of its |
||||
// contributors may be used to endorse or promote products derived from |
||||
// this software without specific prior written permission. |
||||
// |
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
|
||||
// An integration test service that covers all the method signature permutations |
||||
// of unary/streaming requests/responses. |
||||
syntax = "proto3"; |
||||
|
||||
package grpc.testing; |
||||
|
||||
message GaugeResponse { |
||||
string name = 1; |
||||
oneof value { |
||||
int64 long_value = 2; |
||||
double double_vale = 3; |
||||
string string_value = 4; |
||||
} |
||||
} |
||||
|
||||
message GaugeRequest { |
||||
string name = 1; |
||||
} |
||||
|
||||
message EmptyMessage {} |
||||
|
||||
service MetricsService { |
||||
rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse); |
||||
rpc GetGauge(GaugeRequest) returns (GaugeResponse); |
||||
} |
@ -0,0 +1,197 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\1.0.2.3.props')" /> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{FE8631BA-DF40-EC70-6078-C2DAF316E329}</ProjectGuid> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||
<PlatformToolset>v100</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||
<PlatformToolset>v110</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||
<PlatformToolset>v120</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="..\..\..\..\vsprojects\cpptest.props" /> |
||||
<Import Project="..\..\..\..\vsprojects\global.props" /> |
||||
<Import Project="..\..\..\..\vsprojects\openssl.props" /> |
||||
<Import Project="..\..\..\..\vsprojects\protobuf.props" /> |
||||
<Import Project="..\..\..\..\vsprojects\winsock.props" /> |
||||
<Import Project="..\..\..\..\vsprojects\zlib.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>metrics_client</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>metrics_client</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;_USE_32BIT_TIME_T;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
<ItemGroup> |
||||
<ClInclude Include="..\..\..\..\test\cpp\util\metrics_server.h" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClCompile Include="..\..\..\..\test\proto\metrics.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="..\..\..\..\test\proto\metrics.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="..\..\..\..\test\proto\metrics.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="..\..\..\..\test\proto\metrics.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="..\..\..\..\test\cpp\interop\metrics_client.cc"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc++\grpc++.vcxproj"> |
||||
<Project>{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc\grpc.vcxproj"> |
||||
<Project>{29D16885-7228-4C31-81ED-5F9187C7F2A9}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\gpr\gpr.vcxproj"> |
||||
<Project>{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}</Project> |
||||
</ProjectReference> |
||||
<ProjectReference Include="..\..\..\..\vsprojects\vcxproj\.\grpc++_test_config\grpc++_test_config.vcxproj"> |
||||
<Project>{3F7D093D-11F9-C4BC-BEB7-18EB28E3F290}</Project> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
<Import Project="..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets" Condition="Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
</ImportGroup> |
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||
<PropertyGroup> |
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||
</PropertyGroup> |
||||
<Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.9\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||
<Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.9\build\native\grpc.dependencies.zlib.targets')" /> |
||||
<Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.2.3\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||
<Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.props')" /> |
||||
<Error Condition="!Exists('..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\vsprojects\packages\grpc.dependencies.openssl.1.0.2.3\build\native\grpc.dependencies.openssl.targets')" /> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,35 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="..\..\..\..\test\proto\metrics.proto"> |
||||
<Filter>test\proto</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="..\..\..\..\test\cpp\interop\metrics_client.cc"> |
||||
<Filter>test\cpp\interop</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClInclude Include="..\..\..\..\test\cpp\util\metrics_server.h"> |
||||
<Filter>test\cpp\util</Filter> |
||||
</ClInclude> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{2c00b6b1-865c-55b2-0d9d-8d7b42ad7d03}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\cpp"> |
||||
<UniqueIdentifier>{a62a5921-b3d4-6069-e9cc-73f34609c99b}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\cpp\interop"> |
||||
<UniqueIdentifier>{fbd5c6ac-f3a9-1b16-6310-c205aadc9075}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\cpp\util"> |
||||
<UniqueIdentifier>{16f4e45d-a509-3e4d-4a19-9383576bec54}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\proto"> |
||||
<UniqueIdentifier>{c638ed75-9aa0-ccc3-a8d2-a1a6203977b1}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue