Using the SCS solver with Convex.jl, the output of the solver includes in its printed output the duality gap:
------------------------------------------------------------------
SCS v3.2.1 - Splitting Conic Solver
(c) Brendan O'Donoghue, Stanford University, 2012
------------------------------------------------------------------
problem: variables n: 2701, constraints m: 7851
cones: z: primal zero / dual free vars: 1
l: linear vars: 50
q: soc vars: 7800, qsize: 2600
settings: eps_abs: 1.0e-04, eps_rel: 1.0e-04, eps_infeas: 1.0e-07
alpha: 1.50, scale: 1.00e-01, adaptive_scale: 1
max_iters: 100000, normalize: 1, rho_x: 1.00e-06
acceleration_lookback: 10, acceleration_interval: 10
lin-sys: sparse-direct-amd-qdldl
nnz(A): 15151, nnz(P): 0
------------------------------------------------------------------
iter | pri res | dua res | gap | obj | scale | time (s)
------------------------------------------------------------------
0| 4.39e+00 1.00e+00 4.96e+01 2.43e+01 1.00e-01 1.02e-02
250| 4.43e-03 7.32e-03 2.04e-01 7.26e+00 1.00e-01 1.34e-01
425| 2.05e-04 1.91e-05 1.42e-04 6.96e+00 3.15e-02 2.24e-01
------------------------------------------------------------------
status: solved
timings: total: 2.24e-01s = setup: 8.90e-03s + solve: 2.15e-01s
lin-sys: 9.77e-02s, cones: 5.55e-02s, accel: 5.25e-03s
------------------------------------------------------------------
objective = 6.961736
------------------------------------------------------------------
Is there a simple way to access the final duality gap programmatically using Convex.jl?