@@ -153,81 +153,37 @@ end
153
153
upload_to_github(content::String, plot_files::Union{Nothing, Tuple, Dict}, auth,
154
154
results_df::DataFrame, system_info::Dict, categories::Dict)
155
155
156
- Share benchmark results via anonymous GitHub gist (no authentication required) .
156
+ Save benchmark results locally with instructions for community sharing .
157
157
"""
158
158
function upload_to_github (content:: String , plot_files:: Union{Nothing, Tuple, Dict} , auth,
159
159
results_df:: DataFrame , system_info:: Dict , categories:: Dict )
160
160
161
- @info " 🌐 Sharing benchmark results via anonymous GitHub gist ..."
161
+ @info " 📁 Saving benchmark results for community sharing ..."
162
162
163
- try
164
- # Create anonymous gist with benchmark results
165
- gist_url = create_anonymous_gist (content, system_info)
166
-
167
- if gist_url != = nothing
168
- @info " ✅ Anonymous gist created successfully!"
169
- @info " 🔗 Share this URL with the LinearSolve.jl community: $gist_url "
170
- @info " 🤝 Your benchmark data helps improve LinearSolve.jl for everyone!"
171
- return
172
- else
173
- @warn " Failed to create anonymous gist"
174
- end
175
- catch e
176
- @warn " ❌ Failed to create anonymous gist: $e "
177
- end
178
-
179
- # Fallback to local save
180
- @info " 📁 Saving results locally as backup..."
163
+ # Create timestamp and system identifier for filename
181
164
timestamp = replace (string (Dates. now ()), " :" => " -" )
182
- fallback_file = " autotune_results_$(timestamp) .md"
183
- open (fallback_file, " w" ) do f
165
+ cpu_name = get (system_info, " cpu_name" , " unknown" )
166
+ os_name = get (system_info, " os" , " unknown" )
167
+
168
+ # Create a descriptive filename
169
+ cpu_short = replace (lowercase (cpu_name), r" [^a-zA-Z0-9]" => " _" )[1 : min (10 , end )]
170
+ os_short = replace (lowercase (os_name), r" [^a-zA-Z0-9]" => " _" )[1 : min (6 , end )]
171
+ filename = " linearsolve_benchmark_$(cpu_short) _$(os_short) _$(timestamp) .md"
172
+
173
+ # Save the results
174
+ open (filename, " w" ) do f
184
175
write (f, content)
185
176
end
186
- @info " 📁 Results saved locally to $fallback_file "
187
- @info " 💡 You can manually share this file with the LinearSolve.jl community"
177
+
178
+ @info " ✅ Benchmark results saved to: $filename "
179
+ @info " "
180
+ @info " 🤝 Help improve LinearSolve.jl by sharing your results!"
181
+ @info " 📋 Easy sharing options:"
182
+ @info " 1. Create a GitHub gist: https://gist.github.com (paste file contents)"
183
+ @info " 2. Share in Julia Discourse: https://discourse.julialang.org"
184
+ @info " 3. Open an issue: https://github.com/SciML/LinearSolve.jl/issues"
185
+ @info " 4. Post in Julia Slack/Discord communities"
186
+ @info " "
187
+ @info " 🎯 Your hardware's performance data helps the entire Julia community!"
188
188
end
189
189
190
- """
191
- create_anonymous_gist(content, system_info)
192
-
193
- Create an anonymous GitHub gist with benchmark results (no auth required).
194
- """
195
- function create_anonymous_gist (content, system_info)
196
- try
197
- # Create gist payload
198
- cpu_name = get (system_info, " cpu_name" , " Unknown CPU" )
199
- os_name = get (system_info, " os" , " Unknown OS" )
200
- timestamp = Dates. format (Dates. now (), " yyyy-mm-dd" )
201
-
202
- filename = " linearsolve_benchmark_$(cpu_name) _$(os_name) _$(timestamp) .md"
203
- # Sanitize filename
204
- filename = replace (filename, r" [^a-zA-Z0-9._-]" => " _" )
205
-
206
- gist_data = Dict (
207
- " description" => " LinearSolve.jl Autotune Benchmark Results - $cpu_name on $os_name " ,
208
- " public" => true ,
209
- " files" => Dict (
210
- filename => Dict (
211
- " content" => content
212
- )
213
- )
214
- )
215
-
216
- # Post to GitHub gist API (no auth required for anonymous gists)
217
- response = HTTP. post (
218
- " https://api.github.com/gists" ,
219
- [" Content-Type" => " application/json" ],
220
- JSON. json (gist_data)
221
- )
222
-
223
- if response. status == 201
224
- result = JSON. parse (String (response. body))
225
- return result[" html_url" ]
226
- else
227
- return nothing
228
- end
229
- catch e
230
- @debug " Anonymous gist creation failed: $e "
231
- return nothing
232
- end
233
- end
0 commit comments