File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
ProjectPlugins/MetricsPlugin Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ private MetricsSetValue[] MapMultipleValues(object[][] values)
123
123
{
124
124
if ( values != null && values . Length > 0 )
125
125
{
126
- return values . Select ( v => MapValue ( v ) ) . ToArray ( ) ;
126
+ return values . Select ( MapValue ) . ToArray ( ) ;
127
127
}
128
128
return Array . Empty < MetricsSetValue > ( ) ;
129
129
}
@@ -156,7 +156,14 @@ private string GetQueryTimeRange()
156
156
157
157
private double ToValue ( object v )
158
158
{
159
- return Convert . ToDouble ( v , CultureInfo . InvariantCulture ) ;
159
+ try
160
+ {
161
+ return Convert . ToDouble ( v , CultureInfo . InvariantCulture ) ;
162
+ }
163
+ catch
164
+ {
165
+ return double . NaN ;
166
+ }
160
167
}
161
168
162
169
private DateTime ToTimestamp ( object v )
@@ -215,7 +222,7 @@ public string AsCsv()
215
222
{
216
223
var value = set . Values . SingleOrDefault ( v => v . Timestamp == ts ) ;
217
224
if ( value == null ) e . Add ( " " ) ;
218
- else e . Add ( value . Value . ToString ( ) ) ;
225
+ else e . Add ( value . Value . ToString ( CultureInfo . InvariantCulture ) ) ;
219
226
}
220
227
} ) ;
221
228
}
You can’t perform that action at this time.
0 commit comments